]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add player autofill to rename command. (#38074)
authorKyle Tyo <36606155+VerinSenpai@users.noreply.github.com>
Fri, 6 Jun 2025 22:52:48 +0000 (18:52 -0400)
committerGitHub <noreply@github.com>
Fri, 6 Jun 2025 22:52:48 +0000 (18:52 -0400)
* simple enough

* switch to CompletionResult.FromOptions and CompletionHelper.SessionNames

* cleanup

Content.Server/Mind/Commands/RenameCommand.cs

index b0059ab4256c20c783ef641d53b6d98be9569e1e..b2d0df7484d31c7c7fff735e3f0260bb40894ed6 100644 (file)
@@ -1,6 +1,5 @@
 using System.Diagnostics.CodeAnalysis;
 using Content.Server.Administration;
-using Content.Shared.Access.Components;
 using Content.Shared.Administration;
 using Content.Shared.CCVar;
 using Robust.Server.Player;
@@ -60,4 +59,12 @@ public sealed class RenameCommand : LocalizedEntityCommands
         entityUid = EntityUid.Invalid;
         return false;
     }
+
+    public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
+    {
+        if (args.Length == 1)
+            return CompletionResult.FromOptions(CompletionHelper.SessionNames());
+
+        return CompletionResult.Empty;
+    }
 }