Add player autofill to rename command. (#38074)

* simple enough

* switch to CompletionResult.FromOptions and CompletionHelper.SessionNames

* cleanup
This commit is contained in:
Kyle Tyo
2025-06-06 18:52:48 -04:00
committed by GitHub
parent 57567a92c6
commit a31376c925

View 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;
}
}