From 1bb1a4f2c4265dd770f3ddfb4a30e1e353bb46a9 Mon Sep 17 00:00:00 2001 From: theg33ka Date: Wed, 8 Jul 2026 01:51:33 +0700 Subject: [PATCH 1/5] added colorable walls --- .../Systems/Sandbox/SandboxUIController.cs | 4 + .../Sandbox/Windows/SandboxWindow.xaml | 1 + .../WallPaint/UI/WallPaintUIController.cs | 60 +++++++ .../_Mono/WallPaint/UI/WallPaintWindow.xaml | 9 + .../WallPaint/UI/WallPaintWindow.xaml.cs | 42 +++++ .../WallPaint/WallPaintPlacementSystem.cs | 155 ++++++++++++++++++ .../_Mono/WallPaint/WallPaintVisualsSystem.cs | 83 ++++++++++ .../_Mono/WallPaint/FillWallPaintCommand.cs | 75 +++++++++ .../_Mono/WallPaint/WallPaintSystem.cs | 89 ++++++++++ .../_Mono/WallPaint/PaintableWallComponent.cs | 10 ++ .../_Mono/WallPaint/WallPaintComponent.cs | 13 ++ .../_Mono/WallPaint/WallPaintEvents.cs | 20 +++ Resources/Locale/en-US/_Mono/wall-paint.ftl | 2 + .../Locale/en-US/sandbox/sandbox-manager.ftl | 1 + Resources/Locale/ru-RU/_Mono/wall-paint.ftl | 2 + .../Locale/ru-RU/sandbox/sandbox-manager.ftl | 1 + .../Entities/Structures/Walls/walls.yml | 6 + .../Structures/Windows/plastitanium.yml | 2 + .../Structures/Windows/reinforced.yml | 2 + .../Entities/Structures/Windows/shuttle.yml | 2 + Resources/Prototypes/Shaders/wall_paint.yml | 4 + .../Textures/Shaders/wall_paint_darken.swsl | 17 ++ 22 files changed, 600 insertions(+) create mode 100644 Content.Client/_Mono/WallPaint/UI/WallPaintUIController.cs create mode 100644 Content.Client/_Mono/WallPaint/UI/WallPaintWindow.xaml create mode 100644 Content.Client/_Mono/WallPaint/UI/WallPaintWindow.xaml.cs create mode 100644 Content.Client/_Mono/WallPaint/WallPaintPlacementSystem.cs create mode 100644 Content.Client/_Mono/WallPaint/WallPaintVisualsSystem.cs create mode 100644 Content.Server/_Mono/WallPaint/FillWallPaintCommand.cs create mode 100644 Content.Server/_Mono/WallPaint/WallPaintSystem.cs create mode 100644 Content.Shared/_Mono/WallPaint/PaintableWallComponent.cs create mode 100644 Content.Shared/_Mono/WallPaint/WallPaintComponent.cs create mode 100644 Content.Shared/_Mono/WallPaint/WallPaintEvents.cs create mode 100644 Resources/Locale/en-US/_Mono/wall-paint.ftl create mode 100644 Resources/Locale/ru-RU/_Mono/wall-paint.ftl create mode 100644 Resources/Prototypes/Shaders/wall_paint.yml create mode 100644 Resources/Textures/Shaders/wall_paint_darken.swsl diff --git a/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs b/Content.Client/UserInterface/Systems/Sandbox/SandboxUIController.cs index f4e37c5034c..57961a5f1b0 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._Mono.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; @@ -143,6 +145,7 @@ private void EnsureWindow() _window.SpawnTilesButton.OnPressed += _ => TileSpawningController.ToggleWindow(); _window.SpawnEntitiesButton.OnPressed += _ => EntitySpawningController.ToggleWindow(); _window.SpawnDecalsButton.OnPressed += _ => DecalPlacerController.ToggleWindow(); + _window.PaintWallsButton.OnPressed += _ => WallPaintController.ToggleWindow(); _window.GiveFullAccessButton.OnPressed += _ => _sandbox.GiveAdminAccess(); _window.GiveAghostButton.OnPressed += _ => _sandbox.GiveAGhost(); _window.ToggleLightButton.OnToggled += _ => _sandbox.ToggleLight(); @@ -197,6 +200,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..258d7b3dfe9 100644 --- a/Content.Client/UserInterface/Systems/Sandbox/Windows/SandboxWindow.xaml +++ b/Content.Client/UserInterface/Systems/Sandbox/Windows/SandboxWindow.xaml @@ -8,6 +8,7 @@