diff --git a/Content.Server/Administration/Commands/SetMindCommand.cs b/Content.Server/Administration/Commands/SetMindCommand.cs index 6ef9c7eede..50263bb328 100644 --- a/Content.Server/Administration/Commands/SetMindCommand.cs +++ b/Content.Server/Administration/Commands/SetMindCommand.cs @@ -10,7 +10,7 @@ namespace Content.Server.Administration.Commands [AdminCommand(AdminFlags.Admin)] sealed class SetMindCommand : IConsoleCommand { - + public string Command => "setmind"; public string Description => Loc.GetString("set-mind-command-description", ("requiredComponent", nameof(MindContainerComponent))); @@ -19,7 +19,7 @@ namespace Content.Server.Administration.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (args.Length != 2) + if (args.Length < 2) { shell.WriteLine(Loc.GetString("shell-wrong-arguments-number")); return; @@ -31,6 +31,12 @@ namespace Content.Server.Administration.Commands return; } + bool ghostOverride = true; + if (args.Length > 2) + { + ghostOverride = bool.Parse(args[2]); + } + var entityManager = IoCManager.Resolve(); var eUid = new EntityUid(entityUid); @@ -62,7 +68,7 @@ namespace Content.Server.Administration.Commands } var mindSystem = entityManager.System(); - + var mind = playerCData.Mind; if (mind == null) { @@ -70,7 +76,7 @@ namespace Content.Server.Administration.Commands mind.CharacterName = entityManager.GetComponent(eUid).EntityName; } - mindSystem.TransferTo(mind, eUid); + mindSystem.TransferTo(mind, eUid, ghostOverride); } } } diff --git a/Resources/Locale/en-US/administration/commands/set-mind-command.ftl b/Resources/Locale/en-US/administration/commands/set-mind-command.ftl index 9f89d88339..7ec910e4ae 100644 --- a/Resources/Locale/en-US/administration/commands/set-mind-command.ftl +++ b/Resources/Locale/en-US/administration/commands/set-mind-command.ftl @@ -1,4 +1,4 @@ -set-mind-command-description = Transfers a mind to the specified entity. The entity must have a {$requiredComponent}. -set-mind-command-help-text = Usage: {$command} +set-mind-command-description = Transfers a mind to the specified entity. The entity must have a {$requiredComponent}. By default this will force minds that are currently visiting other entities to return (i.e., return a ghost to their main body). +set-mind-command-help-text = Usage: {$command} [unvisit] set-mind-command-target-has-no-content-data-message = Target player does not have content data (wtf?) -set-mind-command-target-has-no-mind-message = Target entity does not have a mind (did you forget to make sentient?) \ No newline at end of file +set-mind-command-target-has-no-mind-message = Target entity does not have a mind (did you forget to make sentient?)