]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
feat: allow admins to interact under subfloors (#38813)
authorPerry Fraser <perryprog@users.noreply.github.com>
Thu, 10 Jul 2025 11:14:37 +0000 (07:14 -0400)
committerGitHub <noreply@github.com>
Thu, 10 Jul 2025 11:14:37 +0000 (13:14 +0200)
* feat: allow admins to interact under subfloors

* feat: use BypassInteractionChecks instead

Content.Shared/SubFloor/SharedSubFloorHideSystem.cs

index 822b8acaf00779adc60536b4677621c83cd36d6e..a4fa463ee0e665bb298e7403a719962507b3c571 100644 (file)
@@ -2,6 +2,7 @@ using Content.Shared.Audio;
 using Content.Shared.Construction.Components;
 using Content.Shared.Explosion;
 using Content.Shared.Eye;
+using Content.Shared.Interaction.Components;
 using Content.Shared.Interaction.Events;
 using Content.Shared.Maps;
 using Content.Shared.Popups;
@@ -83,6 +84,10 @@ namespace Content.Shared.SubFloor
 
         private void OnInteractionAttempt(EntityUid uid, SubFloorHideComponent component, ref GettingInteractedWithAttemptEvent args)
         {
+            // Allow admins (e.g., mappers/aghosts) to twiddle with stuff under subfloors
+            if (HasComp<BypassInteractionChecksComponent>(args.Uid))
+                return;
+
             // No interactions with entities hidden under floor tiles.
             if (component.BlockInteractions && component.IsUnderCover)
                 args.Cancelled = true;