feat: allow admins to interact under subfloors (#38813)
* feat: allow admins to interact under subfloors * feat: use BypassInteractionChecks instead
This commit is contained in:
parent
9b85def0a7
commit
decaa58dfe
1 changed files with 5 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ using Content.Shared.Audio;
|
||||||
using Content.Shared.Construction.Components;
|
using Content.Shared.Construction.Components;
|
||||||
using Content.Shared.Explosion;
|
using Content.Shared.Explosion;
|
||||||
using Content.Shared.Eye;
|
using Content.Shared.Eye;
|
||||||
|
using Content.Shared.Interaction.Components;
|
||||||
using Content.Shared.Interaction.Events;
|
using Content.Shared.Interaction.Events;
|
||||||
using Content.Shared.Maps;
|
using Content.Shared.Maps;
|
||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
|
|
@ -83,6 +84,10 @@ namespace Content.Shared.SubFloor
|
||||||
|
|
||||||
private void OnInteractionAttempt(EntityUid uid, SubFloorHideComponent component, ref GettingInteractedWithAttemptEvent args)
|
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.
|
// No interactions with entities hidden under floor tiles.
|
||||||
if (component.BlockInteractions && component.IsUnderCover)
|
if (component.BlockInteractions && component.IsUnderCover)
|
||||||
args.Cancelled = true;
|
args.Cancelled = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue