add debug verb for inspecting mind entities (#36474)
* mind verb * new line
This commit is contained in:
@@ -32,11 +32,26 @@ namespace Content.Client.Administration.Systems
|
||||
var verb = new VvVerb()
|
||||
{
|
||||
Text = Loc.GetString("view-variables"),
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/vv.svg.192dpi.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/vv.svg.192dpi.png")),
|
||||
Act = () => _clientConsoleHost.ExecuteCommand($"vv {GetNetEntity(args.Target)}"),
|
||||
ClientExclusive = true // opening VV window is client-side. Don't ask server to run this 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))
|
||||
|
||||
1
Resources/Locale/en-US/mind/verbs/inspect-mind.ftl
Normal file
1
Resources/Locale/en-US/mind/verbs/inspect-mind.ftl
Normal file
@@ -0,0 +1 @@
|
||||
inspect-mind-verb-get-data-text = Inspect Mind
|
||||
Reference in New Issue
Block a user