]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Merge showsubfloorforever into showsubfloor (#33682)
authorSpaceManiac <tad@platymuus.com>
Tue, 11 Mar 2025 00:01:11 +0000 (17:01 -0700)
committerGitHub <noreply@github.com>
Tue, 11 Mar 2025 00:01:11 +0000 (11:01 +1100)
Content.Client/Commands/DebugCommands.cs
Content.Client/Commands/MappingClientSideSetupCommand.cs
Content.Client/SubFloor/SubFloorHideSystem.cs
Resources/Locale/en-US/commands/debug-command.ftl
Resources/clientCommandPerms.yml

index 20d763a0e90c7dcf3247c81a56b2ad2cc90664e7..c4aa8847e4a84efc9297a031f66e08744f006912 100644 (file)
@@ -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<SubFloorHideSystem>().ShowAll = true;
-
-        var entMan = IoCManager.Resolve<IEntityManager>();
-        var components = entMan.EntityQuery<SubFloorHideComponent, SpriteComponent>(true);
-
-        foreach (var (_, sprite) in components)
-        {
-            sprite.DrawDepth = (int) DrawDepth.Overlays;
-        }
-    }
-}
-
 internal sealed class NotifyCommand : LocalizedCommands
 {
     [Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
index d17f1fccaf85d4811be815138581e93a38dab1d7..99a8ba00fe21949fdd35274de94d0763a3b19885 100644 (file)
@@ -24,7 +24,7 @@ internal sealed class MappingClientSideSetupCommand : LocalizedCommands
         {
             _entitySystemManager.GetEntitySystem<MarkerSystem>().MarkersVisible = true;
             _lightManager.Enabled = false;
-            shell.ExecuteCommand("showsubfloorforever");
+            shell.ExecuteCommand("showsubfloor");
             _entitySystemManager.GetEntitySystem<ActionsSystem>().LoadActionAssignments("/mapping_actions.yml", false);
         }
     }
index 5e5f2993b43d74c8a908a8601e5c84df401382d8..df65717c40596fe1783585683526af8a8b10739c 100644 (file)
@@ -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;
index a99cc2b4494c2dc63fda218b3e4fc616c9b148c7..4be72936a8a71ef0f80ee58a65773ea2cfae67ad 100644 (file)
@@ -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} <message>
index 2e613a0fce497a80bef07ffb0ad7ca32f89d3781..cbe654e557eb2f08d4d297ba87721061ba5568fe 100644 (file)
@@ -65,7 +65,6 @@
     - showemergencyshuttle
     - zoom
     - showsubfloor
-    - showsubfloorforever
     - showmarkers
     - nodevis
     - nodevisfilter