diff --git a/Content.Server/Chemistry/Commands/DumpReagentGuideText.cs b/Content.Server/Chemistry/Commands/DumpReagentGuideText.cs index 563708b8f3..a70c2196ab 100644 --- a/Content.Server/Chemistry/Commands/DumpReagentGuideText.cs +++ b/Content.Server/Chemistry/Commands/DumpReagentGuideText.cs @@ -7,32 +7,31 @@ using Robust.Shared.Prototypes; namespace Content.Server.Chemistry.Commands; [AdminCommand(AdminFlags.Debug)] -public sealed class DumpReagentGuideText : IConsoleCommand +public sealed class DumpReagentGuideText : LocalizedEntityCommands { [Dependency] private readonly IPrototypeManager _prototype = default!; - [Dependency] private readonly IEntitySystemManager _entSys = default!; - public string Command => "dumpreagentguidetext"; - public string Description => "Dumps the guidebook text for a reagent to the console"; - public string Help => "dumpreagentguidetext "; + public override string Command => "dumpreagentguidetext"; - public void Execute(IConsoleShell shell, string argStr, string[] args) + public override void Execute(IConsoleShell shell, string argStr, string[] args) { if (args.Length != 1) { - shell.WriteError("Must have only 1 argument"); + shell.WriteError(Loc.GetString($"shell-need-exactly-one-argument")); return; } if (!_prototype.TryIndex(args[0], out var reagent)) { - shell.WriteError($"Invalid prototype: {args[0]}"); + shell.WriteError(Loc.GetString($"shell-argument-must-be-prototype", + ("index", args[0]), + ("prototype", nameof(ReagentPrototype)))); return; } if (reagent.Metabolisms is null) { - shell.WriteLine("Nothing to dump."); + shell.WriteLine(Loc.GetString($"cmd-dumpreagentguidetext-nothing-to-dump")); return; } @@ -40,7 +39,8 @@ public sealed class DumpReagentGuideText : IConsoleCommand { foreach (var effect in entry.Effects) { - shell.WriteLine(effect.GuidebookEffectDescription(_prototype, _entSys) ?? $"[skipped effect of type {effect.GetType()}]"); + shell.WriteLine(effect.GuidebookEffectDescription(_prototype, EntityManager.EntitySysManager) ?? + Loc.GetString($"cmd-dumpreagentguidetext-skipped", ("effect", effect.GetType()))); } } } diff --git a/Resources/Locale/en-US/commands/dump-reagent-guide-text-command.ftl b/Resources/Locale/en-US/commands/dump-reagent-guide-text-command.ftl new file mode 100644 index 0000000000..694854c1cd --- /dev/null +++ b/Resources/Locale/en-US/commands/dump-reagent-guide-text-command.ftl @@ -0,0 +1,4 @@ +cmd-dumpreagentguidetext-desc = Dumps the guidebook text for a reagent to the console. +cmd-dumpreagentguidetext-help = Usage: dumpreagentguidetext +cmd-dumpreagentguidetext-nothing-to-dump = Nothing to dump. +cmd-dumpreagentguidetext-skipped = [skipped effect of type {$effect}]