add debug verb for inspecting mind entities (#36474)

* mind verb

* new line
This commit is contained in:
slarticodefast
2025-04-12 15:37:07 +02:00
committed by GitHub
parent 4e5a73a447
commit fca83f9924
2 changed files with 17 additions and 1 deletions

View File

@@ -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))

View File

@@ -0,0 +1 @@
inspect-mind-verb-get-data-text = Inspect Mind