From 43755601fd36c75d86cc74cb9ac04f808ccd8f2f Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 13 Jul 2022 11:59:59 +1000 Subject: [PATCH] Add admin verb for respawning a player (#9666) --- .../Administration/Systems/AdminVerbSystem.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.cs b/Content.Server/Administration/Systems/AdminVerbSystem.cs index 69242acb92..da099f45ae 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.cs @@ -141,6 +141,24 @@ namespace Content.Server.Administration.Systems Act = () => _console.ExecuteCommand(player, $"tpto {args.Target} {args.User}"), Impact = LogImpact.Low }); + + // Respawn + if (HasComp(args.Target)) + { + args.Verbs.Add(new Verb() + { + Text = Loc.GetString("admin-player-actions-respawn"), + Category = VerbCategory.Admin, + Act = () => + { + if (!TryComp(args.Target, out var actor)) return; + + _console.ExecuteCommand(player, $"respawn {actor.PlayerSession.Name}"); + }, + ConfirmationPopup = true, + // No logimpact as the command does it internally. + }); + } } }