diff --git a/Content.Shared/Doors/Components/DoorComponent.cs b/Content.Shared/Doors/Components/DoorComponent.cs index 65a6ee6c9b..a8cb25782e 100644 --- a/Content.Shared/Doors/Components/DoorComponent.cs +++ b/Content.Shared/Doors/Components/DoorComponent.cs @@ -258,9 +258,6 @@ public sealed partial class DoorComponent : Component [DataField, ViewVariables(VVAccess.ReadWrite)] public bool CanPry = true; - [DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadOnly)] - public bool IsBeingPried; - [DataField] public ProtoId PryingQuality = "Prying"; diff --git a/Content.Shared/Doors/Systems/SharedAirlockSystem.cs b/Content.Shared/Doors/Systems/SharedAirlockSystem.cs index 0992ea19d7..bdd119004e 100644 --- a/Content.Shared/Doors/Systems/SharedAirlockSystem.cs +++ b/Content.Shared/Doors/Systems/SharedAirlockSystem.cs @@ -40,9 +40,10 @@ public abstract class SharedAirlockSystem : EntitySystem // only block based on bolts / power status when initially closing the door, not when its already // mid-transition. Particularly relevant for when the door was pried-closed with a crowbar, which bypasses // the initial power-check. + if (TryComp(uid, out DoorComponent? door) && !door.Partial - && !CanChangeState(uid, airlock, door.IsBeingPried)) + && !CanChangeState(uid, airlock)) { args.Cancel(); } @@ -173,8 +174,8 @@ public abstract class SharedAirlockSystem : EntitySystem component.Safety = value; } - public bool CanChangeState(EntityUid uid, AirlockComponent component, bool isBeingPried = false) + public bool CanChangeState(EntityUid uid, AirlockComponent component) { - return component.Powered && !DoorSystem.IsBolted(uid) || !component.Powered && isBeingPried ; + return component.Powered && !DoorSystem.IsBolted(uid); } } diff --git a/Content.Shared/Doors/Systems/SharedDoorSystem.cs b/Content.Shared/Doors/Systems/SharedDoorSystem.cs index 26c41d415f..23bea0cdf1 100644 --- a/Content.Shared/Doors/Systems/SharedDoorSystem.cs +++ b/Content.Shared/Doors/Systems/SharedDoorSystem.cs @@ -236,7 +236,6 @@ public abstract partial class SharedDoorSystem : EntitySystem } else if (door.State == DoorState.Open) { - door.IsBeingPried = true; _adminLog.Add(LogType.Action, LogImpact.Medium, $"{ToPrettyString(args.User)} pried {ToPrettyString(uid)} closed"); StartClosing(uid, door, args.User, true); } @@ -478,13 +477,11 @@ public abstract partial class SharedDoorSystem : EntitySystem door.NextStateChange = GameTiming.CurTime + door.OpenTimeTwo; door.State = DoorState.Open; AppearanceSystem.SetData(uid, DoorVisuals.State, DoorState.Open); - door.IsBeingPried = false; Dirty(uid, door); return false; } door.Partial = true; - door.IsBeingPried = false; SetCollidable(uid, true, door, physics); door.NextStateChange = GameTiming.CurTime + door.CloseTimeTwo; Dirty(uid, door);