From: MilenVolf <63782763+MilenVolf@users.noreply.github.com> Date: Wed, 12 Mar 2025 05:49:32 +0000 (+0300) Subject: Localize rat king commands datasets (#35780) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=5db89ab7e964f4e9a75f0b5f82a0f344f8ba8c13;p=space-station-14.git Localize rat king commands datasets (#35780) --- diff --git a/Content.Server/RatKing/RatKingSystem.cs b/Content.Server/RatKing/RatKingSystem.cs index 01c213d540..eb3bef6c02 100644 --- a/Content.Server/RatKing/RatKingSystem.cs +++ b/Content.Server/RatKing/RatKingSystem.cs @@ -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(datasetId, out var datasetPrototype)) + !PrototypeManager.TryIndex(datasetId, out var datasetPrototype)) return; - var msg = Random.Pick(datasetPrototype.Values); + var msg = Random.Pick(datasetPrototype); _chat.TrySendInGameICMessage(uid, msg, InGameICChatType.Speak, true); } } diff --git a/Resources/Locale/en-US/datasets/rat_king_commands.ftl b/Resources/Locale/en-US/datasets/rat_king_commands.ftl new file mode 100644 index 0000000000..6e41275721 --- /dev/null +++ b/Resources/Locale/en-US/datasets/rat_king_commands.ftl @@ -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! diff --git a/Resources/Prototypes/Datasets/rat_king_commands.yml b/Resources/Prototypes/Datasets/rat_king_commands.yml index c53d1e135b..6cfb2a6dba 100644 --- a/Resources/Prototypes/Datasets/rat_king_commands.yml +++ b/Resources/Prototypes/Datasets/rat_king_commands.yml @@ -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