Add player autofill to rename command. (#38074)
* simple enough * switch to CompletionResult.FromOptions and CompletionHelper.SessionNames * cleanup
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user