From: Kyle Tyo <36606155+VerinSenpai@users.noreply.github.com> Date: Fri, 6 Jun 2025 22:52:48 +0000 (-0400) Subject: Add player autofill to rename command. (#38074) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=a31376c925a6216fffb2f6f161d9a6ee529d4549;p=space-station-14.git Add player autofill to rename command. (#38074) * simple enough * switch to CompletionResult.FromOptions and CompletionHelper.SessionNames * cleanup --- diff --git a/Content.Server/Mind/Commands/RenameCommand.cs b/Content.Server/Mind/Commands/RenameCommand.cs index b0059ab425..b2d0df7484 100644 --- a/Content.Server/Mind/Commands/RenameCommand.cs +++ b/Content.Server/Mind/Commands/RenameCommand.cs @@ -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; + } }