From: Kot <1192090+koteq@users.noreply.github.com> Date: Mon, 5 Feb 2024 23:31:21 +0000 (+0400) Subject: Allow opening doors mid-deny animation, if you have the access (#24969) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=bedccf8e31c53faff90f46822efce6143e6dc2e1;p=space-station-14.git Allow opening doors mid-deny animation, if you have the access (#24969) Allow opening doors mid-deny animation, if you have access ofc --- diff --git a/Content.Server/DeviceLinking/Systems/DoorSignalControlSystem.cs b/Content.Server/DeviceLinking/Systems/DoorSignalControlSystem.cs index 56a754a756..90623dbae3 100644 --- a/Content.Server/DeviceLinking/Systems/DoorSignalControlSystem.cs +++ b/Content.Server/DeviceLinking/Systems/DoorSignalControlSystem.cs @@ -59,8 +59,7 @@ namespace Content.Server.DeviceLinking.Systems { if (state == SignalState.High || state == SignalState.Momentary) { - if (door.State is DoorState.Closed or DoorState.Open) - _doorSystem.TryToggleDoor(uid, door); + _doorSystem.TryToggleDoor(uid, door); } } else if (args.Port == component.InBolt) diff --git a/Content.Server/Doors/Systems/DoorSystem.cs b/Content.Server/Doors/Systems/DoorSystem.cs index fffc0a4e1f..d59ea59622 100644 --- a/Content.Server/Doors/Systems/DoorSystem.cs +++ b/Content.Server/Doors/Systems/DoorSystem.cs @@ -136,13 +136,13 @@ public sealed class DoorSystem : SharedDoorSystem if (!door.BumpOpen) return; - if (door.State != DoorState.Closed) + if (door.State is not (DoorState.Closed or DoorState.Denying)) return; var otherUid = args.OtherEntity; if (Tags.HasTag(otherUid, "DoorBumpOpener")) - TryOpen(uid, door, otherUid); + TryOpen(uid, door, otherUid, quiet: door.State == DoorState.Denying); } private void OnEmagged(EntityUid uid, DoorComponent door, ref GotEmaggedEvent args) { diff --git a/Content.Shared/Doors/Systems/SharedDoorSystem.cs b/Content.Shared/Doors/Systems/SharedDoorSystem.cs index 954c22df38..53d79cada7 100644 --- a/Content.Shared/Doors/Systems/SharedDoorSystem.cs +++ b/Content.Shared/Doors/Systems/SharedDoorSystem.cs @@ -212,9 +212,9 @@ public abstract class SharedDoorSystem : EntitySystem if (!Resolve(uid, ref door)) return false; - if (door.State == DoorState.Closed) + if (door.State is DoorState.Closed or DoorState.Denying) { - return TryOpen(uid, door, user, predicted); + return TryOpen(uid, door, user, predicted, quiet: door.State == DoorState.Denying); } else if (door.State == DoorState.Open) {