]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add autocomplete to controlmob (#36234)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Thu, 3 Apr 2025 03:32:14 +0000 (14:32 +1100)
committerGitHub <noreply@github.com>
Thu, 3 Apr 2025 03:32:14 +0000 (05:32 +0200)
Expensive for what it is just really annoying in debug to not have it. Worst case I just make it debug only and we don't add it for release.

Content.Server/Administration/Commands/ControlMob.cs

index 8613fafeae53a292b8246b9d725a9908ad92bb54..26cd83510b114ff0b89f3dda1c1dba3f0a984629 100644 (file)
@@ -43,5 +43,13 @@ namespace Content.Server.Administration.Commands
 
             _entities.System<MindSystem>().ControlMob(player.UserId, target.Value);
         }
+
+        public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
+        {
+            if (args.Length != 1)
+                return CompletionResult.Empty;
+
+            return CompletionResult.FromOptions(CompletionHelper.NetEntities(args[0], entManager: _entities));
+        }
     }
 }