diff --git a/Content.Client/Decals/DecalPlacementSystem.cs b/Content.Client/Decals/DecalPlacementSystem.cs index ac39182ac68..70c1b10047c 100644 --- a/Content.Client/Decals/DecalPlacementSystem.cs +++ b/Content.Client/Decals/DecalPlacementSystem.cs @@ -35,6 +35,8 @@ public sealed partial class DecalPlacementSystem : EntitySystem private bool _placing; private bool _erasing; + public bool IsActive => _active; // Forge-Change + public (DecalPrototype? Decal, bool Snap, Angle Angle, Color Color) GetActiveDecal() { return _active && _decalId != null ? diff --git a/Content.Client/UserInterface/Systems/DecalPlacer/DecalPlacerUIController.cs b/Content.Client/UserInterface/Systems/DecalPlacer/DecalPlacerUIController.cs index 7bfd99ed2f9..f9abe3413c4 100644 --- a/Content.Client/UserInterface/Systems/DecalPlacer/DecalPlacerUIController.cs +++ b/Content.Client/UserInterface/Systems/DecalPlacer/DecalPlacerUIController.cs @@ -75,7 +75,7 @@ private void EnsureWindow() ReloadPrototypes(); } - private void CloseWindow() + public void CloseWindow() // Forge-Change { if (_window == null || _window.Disposed) return; diff --git a/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs b/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs index f4e37c5034c..49d90a5f34a 100644 --- a/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs +++ b/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs @@ -4,6 +4,7 @@ using Content.Client.Markers; using Content.Client.Sandbox; using Content.Client.SubFloor; +using Content.Client._Forge.WallPaint.UI; using Content.Client.UserInterface.Controls; using Content.Client.UserInterface.Systems.DecalPlacer; using Content.Client.UserInterface.Systems.Sandbox.Windows; @@ -46,6 +47,7 @@ public sealed partial class SandboxUIController : UIController, IOnStateChanged< private EntitySpawningUIController EntitySpawningController => UIManager.GetUIController(); private TileSpawningUIController TileSpawningController => UIManager.GetUIController(); private DecalPlacerUIController DecalPlacerController => UIManager.GetUIController(); + private WallPaintUIController WallPaintController => UIManager.GetUIController(); private MenuButton? SandboxButton => UIManager.GetActiveUIWidgetOrNull()?.SandboxButton; @@ -61,6 +63,7 @@ public void OnStateEntered(GameplayState state) { if (!_admin.CanAdminPlace()) return; + WallPaintController.CloseWindow(); // Forge-Change EntitySpawningController.ToggleWindow(); })); _input.SetInputCommand(ContentKeyFunctions.OpenSandboxWindow, @@ -70,6 +73,7 @@ public void OnStateEntered(GameplayState state) { if (!_admin.CanAdminPlace()) return; + WallPaintController.CloseWindow(); // Forge-Change TileSpawningController.ToggleWindow(); })); _input.SetInputCommand(ContentKeyFunctions.OpenDecalSpawnWindow, @@ -77,6 +81,7 @@ public void OnStateEntered(GameplayState state) { if (!_admin.CanAdminPlace()) return; + WallPaintController.CloseWindow(); // Forge-Change DecalPlacerController.ToggleWindow(); })); @@ -140,9 +145,28 @@ private void EnsureWindow() _console.ExecuteCommand($"rmcomp {pnent.Id} StationAiOverlay"); }; _window.RespawnButton.OnPressed += _ => _sandbox.Respawn(); - _window.SpawnTilesButton.OnPressed += _ => TileSpawningController.ToggleWindow(); - _window.SpawnEntitiesButton.OnPressed += _ => EntitySpawningController.ToggleWindow(); - _window.SpawnDecalsButton.OnPressed += _ => DecalPlacerController.ToggleWindow(); + _window.SpawnTilesButton.OnPressed += _ => // Forge-Change + { + WallPaintController.CloseWindow(); + TileSpawningController.ToggleWindow(); + }; + _window.SpawnEntitiesButton.OnPressed += _ => // Forge-Change + { + WallPaintController.CloseWindow(); + EntitySpawningController.ToggleWindow(); + }; + _window.SpawnDecalsButton.OnPressed += _ => // Forge-Change + { + WallPaintController.CloseWindow(); + DecalPlacerController.ToggleWindow(); + }; + _window.PaintWallsButton.OnPressed += _ => // Forge-Change + { + EntitySpawningController.CloseWindow(); + TileSpawningController.CloseWindow(); + DecalPlacerController.CloseWindow(); + WallPaintController.ToggleWindow(); + }; _window.GiveFullAccessButton.OnPressed += _ => _sandbox.GiveAdminAccess(); _window.GiveAghostButton.OnPressed += _ => _sandbox.GiveAGhost(); _window.ToggleLightButton.OnToggled += _ => _sandbox.ToggleLight(); @@ -197,6 +221,7 @@ private void CloseAll() _window?.Close(); EntitySpawningController.CloseWindow(); TileSpawningController.CloseWindow(); + WallPaintController.CloseWindow(); } private bool Copy(ICommonSession? session, EntityCoordinates coords, EntityUid uid) diff --git a/Content.Client/UserInterface/Systems/Sandbox/Windows/SandboxWindow.xaml b/Content.Client/UserInterface/Systems/Sandbox/Windows/SandboxWindow.xaml index bec1d6b4d6f..e105349c9c0 100644 --- a/Content.Client/UserInterface/Systems/Sandbox/Windows/SandboxWindow.xaml +++ b/Content.Client/UserInterface/Systems/Sandbox/Windows/SandboxWindow.xaml @@ -8,6 +8,8 @@