]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix colornetwork desc and help (#29856)
authorlzk <124214523+lzk228@users.noreply.github.com>
Tue, 9 Jul 2024 23:24:38 +0000 (01:24 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Jul 2024 23:24:38 +0000 (09:24 +1000)
* Fix colornetwork description

* suggested changes

* forgor

* done

* ok now it IS done

Content.Server/Sandbox/Commands/ColorNetworkCommand.cs
Resources/Locale/en-US/commands/colornetwork-command.ftl [new file with mode: 0644]

index d5dca64eaaca9c2eba92a17a6d09023fb54cc27c..1fc207058d8cbaf7e303d195a5e87c5f0e2842f0 100644 (file)
@@ -9,21 +9,19 @@ using Robust.Shared.Console;
 namespace Content.Server.Sandbox.Commands
 {
     [AnyCommand]
-    public sealed class ColorNetworkCommand : IConsoleCommand
+    public sealed class ColorNetworkCommand : LocalizedCommands
     {
         [Dependency] private readonly IEntityManager _entManager = default!;
 
-        public string Command => "colornetwork";
-        public string Description => Loc.GetString("color-network-command-description");
-        public string Help => Loc.GetString("color-network-command-help-text", ("command",Command));
+        public override string Command => "colornetwork";
 
-        public void Execute(IConsoleShell shell, string argStr, string[] args)
+        public override void Execute(IConsoleShell shell, string argStr, string[] args)
         {
             var sandboxManager = _entManager.System<SandboxSystem>();
             var adminManager = IoCManager.Resolve<IAdminManager>();
             if (shell.IsClient && (!sandboxManager.IsSandboxEnabled && !adminManager.HasAdminFlag(shell.Player!, AdminFlags.Mapping)))
             {
-                shell.WriteError("You are not currently able to use mapping commands.");
+                shell.WriteError(Loc.GetString("cmd-colornetwork-no-access"));
             }
 
             if (args.Length != 3)
diff --git a/Resources/Locale/en-US/commands/colornetwork-command.ftl b/Resources/Locale/en-US/commands/colornetwork-command.ftl
new file mode 100644 (file)
index 0000000..3fd60bc
--- /dev/null
@@ -0,0 +1,3 @@
+cmd-colornetwork-desc = Paints the atmos devices in the specified color
+cmd-colornetwork-help = colornetwork <uid> Pipe <HexColor>
+cmd-colornetwork-no-access = You are not currently able to use mapping commands.