Prevent non-airlock doors from closing on people. (#6882)

This commit is contained in:
Leon Friedrich
2022-02-25 19:32:35 +13:00
committed by GitHub
parent 49ae383f06
commit 6dc681683c
4 changed files with 28 additions and 12 deletions

View File

@@ -25,16 +25,23 @@ namespace Content.Shared.Doors
}
/// <summary>
/// Raised when the door is determining whether it is able to close.
/// Cancel to stop the door from being closed.
/// Raised when the door is determining whether it is able to close. If the event is canceled, the door will not
/// close. Additionally this event also has a bool that determines whether or not the door should perform a
/// safety/collision check before closing. This check has to be proactively disabled by things like hacked airlocks.
/// </summary>
/// <remarks>
/// This event is raised both when the door is initially closed, and when it is just about to become "partially"
/// closed (opaque & collidable). If canceled while partially closing, it will start opening again. Useful for
/// things like airlock anti-crush safety features.
/// closed (opaque & collidable). If canceled while partially closing, it will start opening again. Useful in case
/// an entity entered the door just as it was about to become "solid".
/// </remarks>
public sealed class BeforeDoorClosedEvent : CancellableEntityEventArgs
{
public bool PerformCollisionCheck;
public BeforeDoorClosedEvent(bool performCollisionCheck)
{
PerformCollisionCheck = performCollisionCheck;
}
}
/// <summary>