Allow opening doors mid-deny animation, if you have the access (#24969)
Allow opening doors mid-deny animation, if you have access ofc
This commit is contained in:
parent
9dc73f0b61
commit
bedccf8e31
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue