fix inspect mind verb (#36558)
This commit is contained in:
@@ -194,7 +194,7 @@ namespace Content.Server.Administration.Systems
|
||||
});
|
||||
}
|
||||
|
||||
if (_mindSystem.TryGetMind(args.Target, out _, out var mind) && mind.UserId != null)
|
||||
if (_mindSystem.TryGetMind(args.Target, out var mindId, out var mindComp) && mindComp.UserId != null)
|
||||
{
|
||||
// Erase
|
||||
args.Verbs.Add(new Verb
|
||||
@@ -206,7 +206,7 @@ namespace Content.Server.Administration.Systems
|
||||
new("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png")),
|
||||
Act = () =>
|
||||
{
|
||||
_adminSystem.Erase(mind.UserId.Value);
|
||||
_adminSystem.Erase(mindComp.UserId.Value);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
ConfirmationPopup = true
|
||||
@@ -219,11 +219,20 @@ namespace Content.Server.Administration.Systems
|
||||
Category = VerbCategory.Admin,
|
||||
Act = () =>
|
||||
{
|
||||
_console.ExecuteCommand(player, $"respawn \"{mind.UserId}\"");
|
||||
_console.ExecuteCommand(player, $"respawn \"{mindComp.UserId}\"");
|
||||
},
|
||||
ConfirmationPopup = true,
|
||||
// No logimpact as the command does it internally.
|
||||
});
|
||||
|
||||
// Inspect mind
|
||||
args.Verbs.Add(new Verb
|
||||
{
|
||||
Text = Loc.GetString("inspect-mind-verb-get-data-text"),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/sentient.svg.192dpi.png")),
|
||||
Category = VerbCategory.Debug,
|
||||
Act = () => _console.RemoteExecuteCommand(player, $"vv {GetNetEntity(mindId)}"),
|
||||
});
|
||||
}
|
||||
|
||||
// Freeze
|
||||
|
||||
Reference in New Issue
Block a user