diff --git a/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs b/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs index 522fce646d..baa6457307 100644 --- a/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs +++ b/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs @@ -1,4 +1,5 @@ -using Content.Client.Gameplay; +using Content.Client.Administration.Managers; +using Content.Client.Gameplay; using Content.Client.Markers; using Content.Client.Sandbox; using Content.Client.SubFloor; @@ -7,6 +8,7 @@ using Content.Client.UserInterface.Systems.DecalPlacer; using Content.Client.UserInterface.Systems.Sandbox.Windows; using Content.Shared.Input; using JetBrains.Annotations; +using Robust.Client.Console; using Robust.Client.Debugging; using Robust.Client.Graphics; using Robust.Client.Input; @@ -50,6 +52,8 @@ public sealed class SandboxUIController : UIController, IOnStateChanged EntitySpawningController.ToggleWindow())); _input.SetInputCommand(ContentKeyFunctions.OpenSandboxWindow, @@ -94,9 +98,12 @@ public sealed class SandboxUIController : UIController, IOnStateChanged _sandbox.MachineLinking(); } - private void GameHudOnSandboxButtonToggled(bool pressed) + private void CheckSandboxVisibility() { - ToggleWindow(); + if (_sandboxButton == null) + return; + + _sandboxButton.Visible = _sandbox.SandboxAllowed; } public void OnStateExited(GameplayState state) @@ -120,11 +127,15 @@ public sealed class SandboxUIController : UIController, IOnStateChanged