From 9f485d71242c07a38e7c750522e67d913eef8526 Mon Sep 17 00:00:00 2001 From: Jacob Tong <10494922+ShadowCommander@users.noreply.github.com> Date: Tue, 1 Nov 2022 18:14:06 -0700 Subject: [PATCH] Add toggle ghost visibility button to ghost GUI (#12325) * Add toggle ghost visibility button to ghosts * Rename to toggleghosts --- Content.Client/Ghost/GhostSystem.cs | 5 ++++ .../Systems/Ghost/GhostUIController.cs | 7 ++++++ .../Systems/Ghost/Widgets/GhostGui.xaml | 1 + .../Systems/Ghost/Widgets/GhostGui.xaml.cs | 2 ++ Content.Server/Ghost/GhostSystem.cs | 25 +++++++++++++++++++ Resources/Locale/en-US/ghost/ghost-gui.ftl | 1 + 6 files changed, 41 insertions(+) diff --git a/Content.Client/Ghost/GhostSystem.cs b/Content.Client/Ghost/GhostSystem.cs index 09e0331cdf..b701c0d498 100644 --- a/Content.Client/Ghost/GhostSystem.cs +++ b/Content.Client/Ghost/GhostSystem.cs @@ -155,5 +155,10 @@ namespace Content.Client.Ghost { _console.RemoteExecuteCommand(null, "ghostroles"); } + + public void ToggleGhostVisibility() + { + _console.RemoteExecuteCommand(null, "toggleghosts"); + } } } diff --git a/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs b/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs index c379cbf643..9f10d0dfe2 100644 --- a/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs +++ b/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs @@ -99,6 +99,7 @@ public sealed class GhostUIController : UIController, IOnSystemChanged