Localize rat king commands datasets (#35780)

This commit is contained in:
MilenVolf
2025-03-12 08:49:32 +03:00
committed by GitHub
parent b5728c228d
commit 5db89ab7e9
3 changed files with 29 additions and 17 deletions

View File

@@ -10,6 +10,7 @@ using Content.Shared.Dataset;
using Content.Shared.Nutrition.Components;
using Content.Shared.Nutrition.EntitySystems;
using Content.Shared.Pointing;
using Content.Shared.Random.Helpers;
using Content.Shared.RatKing;
using Robust.Shared.Map;
using Robust.Shared.Random;
@@ -120,10 +121,10 @@ namespace Content.Server.RatKing
base.DoCommandCallout(uid, component);
if (!component.OrderCallouts.TryGetValue(component.CurrentOrder, out var datasetId) ||
!PrototypeManager.TryIndex<DatasetPrototype>(datasetId, out var datasetPrototype))
!PrototypeManager.TryIndex<LocalizedDatasetPrototype>(datasetId, out var datasetPrototype))
return;
var msg = Random.Pick(datasetPrototype.Values);
var msg = Random.Pick(datasetPrototype);
_chat.TrySendInGameICMessage(uid, msg, InGameICChatType.Speak, true);
}
}

View File

@@ -0,0 +1,14 @@
rat-king-command-stay-1 = Sit!
rat-king-command-stay-2 = Stay!
rat-king-command-stay-3 = Stop!
rat-king-command-follow-1 = Heel!
rat-king-command-follow-2 = Follow!
rat-king-command-cheese-1 = Attack!
rat-king-command-cheese-2 = Sic!
rat-king-command-cheese-3 = Kill!
rat-king-command-cheese-4 = Cheese 'Em!
rat-king-command-loose-1 = Free!
rat-king-command-loose-2 = Loose!

View File

@@ -1,26 +1,23 @@
- type: dataset
- type: localizedDataset
id: RatKingCommandStay
values:
- "Sit!"
- "Stay!"
- "Stop!"
prefix: rat-king-command-stay-
count: 3
- type: dataset
- type: localizedDataset
id: RatKingCommandFollow
values:
- "Heel!"
- "Follow!"
prefix: rat-king-command-follow-
count: 2
- type: dataset
- type: localizedDataset
id: RatKingCommandCheeseEm
values:
- "Attack!"
- "Sic!"
- "Kill!"
- "Cheese 'Em!"
prefix: rat-king-command-cheese-
count: 4
- type: dataset
- type: localizedDataset
id: RatKingCommandLoose
values:
- "Free!"
- "Loose!"
prefix: rat-king-command-loose-
count: 2