From ca612aa16070f8fda600bd4a656458f7ee7f7755 Mon Sep 17 00:00:00 2001 From: SpaceManiac Date: Tue, 11 Mar 2025 03:01:11 +0300 Subject: [PATCH] Merge showsubfloorforever into showsubfloor (#33682) (cherry picked from commit 38615b72e5cd2a2ef5e539b40cc5802e6542da91) --- Content.Client/Commands/DebugCommands.cs | 23 ------------------- Content.Client/SubFloor/SubFloorHideSystem.cs | 10 ++++++-- .../Locale/en-US/commands/debug-command.ftl | 3 --- Resources/clientCommandPerms.yml | 1 - 4 files changed, 8 insertions(+), 29 deletions(-) diff --git a/Content.Client/Commands/DebugCommands.cs b/Content.Client/Commands/DebugCommands.cs index 20d763a0e9..c4aa8847e4 100644 --- a/Content.Client/Commands/DebugCommands.cs +++ b/Content.Client/Commands/DebugCommands.cs @@ -36,29 +36,6 @@ internal sealed class ShowSubFloor : LocalizedCommands } } -internal sealed class ShowSubFloorForever : LocalizedCommands -{ - [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!; - - public const string CommandName = "showsubfloorforever"; - public override string Command => CommandName; - - public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command)); - - public override void Execute(IConsoleShell shell, string argStr, string[] args) - { - _entitySystemManager.GetEntitySystem().ShowAll = true; - - var entMan = IoCManager.Resolve(); - var components = entMan.EntityQuery(true); - - foreach (var (_, sprite) in components) - { - sprite.DrawDepth = (int) DrawDepth.Overlays; - } - } -} - internal sealed class NotifyCommand : LocalizedCommands { [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!; diff --git a/Content.Client/SubFloor/SubFloorHideSystem.cs b/Content.Client/SubFloor/SubFloorHideSystem.cs index 5e5f2993b4..df65717c40 100644 --- a/Content.Client/SubFloor/SubFloorHideSystem.cs +++ b/Content.Client/SubFloor/SubFloorHideSystem.cs @@ -64,9 +64,15 @@ public sealed class SubFloorHideSystem : SharedSubFloorHideSystem args.Sprite.Visible = hasVisibleLayer || revealed; - // allows a t-ray to show wires/pipes above carpets/puddles - if (scannerRevealed) + if (ShowAll) { + // Allows sandbox mode to make wires visible over other stuff. + component.OriginalDrawDepth ??= args.Sprite.DrawDepth; + args.Sprite.DrawDepth = (int)Shared.DrawDepth.DrawDepth.Overdoors; + } + else if (scannerRevealed) + { + // Allows a t-ray to show wires/pipes above carpets/puddles. if (component.OriginalDrawDepth is not null) return; component.OriginalDrawDepth = args.Sprite.DrawDepth; diff --git a/Resources/Locale/en-US/commands/debug-command.ftl b/Resources/Locale/en-US/commands/debug-command.ftl index a99cc2b449..4be72936a8 100644 --- a/Resources/Locale/en-US/commands/debug-command.ftl +++ b/Resources/Locale/en-US/commands/debug-command.ftl @@ -4,8 +4,5 @@ cmd-showmarkers-help = Usage: {$command} cmd-showsubfloor-desc = Makes entities below the floor always visible. cmd-showsubfloor-help = Usage: {$command} -cmd-showsubfloorforever-desc = Makes entities below the floor always visible until the client is restarted. -cmd-showsubfloorforever-help = Usage: {$command} - cmd-notify-desc = Send a notify client side. cmd-notify-help = Usage: {$command} diff --git a/Resources/clientCommandPerms.yml b/Resources/clientCommandPerms.yml index 1cd24d5668..d278cea3c5 100644 --- a/Resources/clientCommandPerms.yml +++ b/Resources/clientCommandPerms.yml @@ -65,7 +65,6 @@ - showemergencyshuttle - zoom - showsubfloor - - showsubfloorforever - showmarkers - nodevis - nodevisfilter