Add admin verb for respawning a player (#9666)

This commit is contained in:
metalgearsloth
2022-07-13 11:59:59 +10:00
committed by GitHub
parent abc8d5b6d8
commit 43755601fd

View File

@@ -141,6 +141,24 @@ namespace Content.Server.Administration.Systems
Act = () => _console.ExecuteCommand(player, $"tpto {args.Target} {args.User}"),
Impact = LogImpact.Low
});
// Respawn
if (HasComp<ActorComponent>(args.Target))
{
args.Verbs.Add(new Verb()
{
Text = Loc.GetString("admin-player-actions-respawn"),
Category = VerbCategory.Admin,
Act = () =>
{
if (!TryComp<ActorComponent>(args.Target, out var actor)) return;
_console.ExecuteCommand(player, $"respawn {actor.PlayerSession.Name}");
},
ConfirmationPopup = true,
// No logimpact as the command does it internally.
});
}
}
}