]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
add debug verb for inspecting mind entities (#36474)
authorslarticodefast <161409025+slarticodefast@users.noreply.github.com>
Sat, 12 Apr 2025 13:37:07 +0000 (15:37 +0200)
committerGitHub <noreply@github.com>
Sat, 12 Apr 2025 13:37:07 +0000 (15:37 +0200)
* mind verb

* new line

Content.Client/Administration/Systems/AdminVerbSystem.cs
Resources/Locale/en-US/mind/verbs/inspect-mind.ftl [new file with mode: 0644]

index dced59bbf2e0cffc1a1e379cf7ab5765d97826f1..4ced299a4dcab189ab1e6a2cac5c77ce5d4f4bac 100644 (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))
diff --git a/Resources/Locale/en-US/mind/verbs/inspect-mind.ftl b/Resources/Locale/en-US/mind/verbs/inspect-mind.ftl
new file mode 100644 (file)
index 0000000..9546762
--- /dev/null
@@ -0,0 +1 @@
+inspect-mind-verb-get-data-text = Inspect Mind