fix inspect mind verb (#36558)
This commit is contained in:
@@ -37,21 +37,6 @@ namespace Content.Client.Administration.Systems
|
|||||||
ClientExclusive = true // opening VV window is client-side. Don't ask server to run this verb.
|
ClientExclusive = true // opening VV window is client-side. Don't ask server to run this verb.
|
||||||
};
|
};
|
||||||
args.Verbs.Add(verb);
|
args.Verbs.Add(verb);
|
||||||
|
|
||||||
// Inspect mind
|
|
||||||
if (TryComp<MindContainerComponent>(args.Target, out var mindContainer)
|
|
||||||
&& mindContainer.HasMind)
|
|
||||||
{
|
|
||||||
Verb mindVerb = new()
|
|
||||||
{
|
|
||||||
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 = () => _clientConsoleHost.ExecuteCommand($"vv {GetNetEntity(mindContainer.Mind)}"),
|
|
||||||
ClientExclusive = true
|
|
||||||
};
|
|
||||||
args.Verbs.Add(mindVerb);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_admin.IsAdmin(args.User))
|
if (!_admin.IsAdmin(args.User))
|
||||||
|
|||||||
@@ -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
|
// Erase
|
||||||
args.Verbs.Add(new Verb
|
args.Verbs.Add(new Verb
|
||||||
@@ -206,7 +206,7 @@ namespace Content.Server.Administration.Systems
|
|||||||
new("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png")),
|
new("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png")),
|
||||||
Act = () =>
|
Act = () =>
|
||||||
{
|
{
|
||||||
_adminSystem.Erase(mind.UserId.Value);
|
_adminSystem.Erase(mindComp.UserId.Value);
|
||||||
},
|
},
|
||||||
Impact = LogImpact.Extreme,
|
Impact = LogImpact.Extreme,
|
||||||
ConfirmationPopup = true
|
ConfirmationPopup = true
|
||||||
@@ -219,11 +219,20 @@ namespace Content.Server.Administration.Systems
|
|||||||
Category = VerbCategory.Admin,
|
Category = VerbCategory.Admin,
|
||||||
Act = () =>
|
Act = () =>
|
||||||
{
|
{
|
||||||
_console.ExecuteCommand(player, $"respawn \"{mind.UserId}\"");
|
_console.ExecuteCommand(player, $"respawn \"{mindComp.UserId}\"");
|
||||||
},
|
},
|
||||||
ConfirmationPopup = true,
|
ConfirmationPopup = true,
|
||||||
// No logimpact as the command does it internally.
|
// 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
|
// Freeze
|
||||||
|
|||||||
Reference in New Issue
Block a user