Fix prying shut unpowered doors (#35380)
This commit is contained in:
committed by
GitHub
parent
7f8f1bfb94
commit
732d9dc2b7
@@ -427,7 +427,7 @@ public abstract partial class SharedDoorSystem : EntitySystem
|
||||
/// <param name="uid"> The uid of the door</param>
|
||||
/// <param name="door"> The doorcomponent of the door</param>
|
||||
/// <param name="user"> The user (if any) opening the door</param>
|
||||
public bool CanClose(EntityUid uid, DoorComponent? door = null, EntityUid? user = null)
|
||||
public bool CanClose(EntityUid uid, DoorComponent? door = null, EntityUid? user = null, bool partial = false)
|
||||
{
|
||||
if (!Resolve(uid, ref door))
|
||||
return false;
|
||||
@@ -437,7 +437,7 @@ public abstract partial class SharedDoorSystem : EntitySystem
|
||||
if (door.State is DoorState.Welded or DoorState.Closed)
|
||||
return false;
|
||||
|
||||
var ev = new BeforeDoorClosedEvent(door.PerformCollisionCheck);
|
||||
var ev = new BeforeDoorClosedEvent(door.PerformCollisionCheck, partial);
|
||||
RaiseLocalEvent(uid, ev);
|
||||
if (ev.Cancelled)
|
||||
return false;
|
||||
@@ -472,7 +472,7 @@ public abstract partial class SharedDoorSystem : EntitySystem
|
||||
return false;
|
||||
|
||||
// Make sure no entity walked into the airlock when it started closing.
|
||||
if (!CanClose(uid, door))
|
||||
if (!CanClose(uid, door, partial: true))
|
||||
{
|
||||
door.NextStateChange = GameTiming.CurTime + door.OpenTimeTwo;
|
||||
door.State = DoorState.Open;
|
||||
|
||||
Reference in New Issue
Block a user