Add admin verb for respawning a player (#9666)
This commit is contained in:
parent
abc8d5b6d8
commit
43755601fd
|
|
@ -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.
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue