Keep windoors open if they are clicked (#11180)
This commit is contained in:
@@ -71,6 +71,10 @@ namespace Content.Server.Doors.Systems
|
||||
component.UpdateBoltLightStatus();
|
||||
|
||||
UpdateAutoClose(uid, component);
|
||||
|
||||
// Make sure the airlock auto closes again next time it is opened
|
||||
if (args.State == DoorState.Closed)
|
||||
component.AutoClose = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -84,6 +88,9 @@ namespace Content.Server.Doors.Systems
|
||||
if (door.State != DoorState.Open)
|
||||
return;
|
||||
|
||||
if (!airlock.AutoClose)
|
||||
return;
|
||||
|
||||
if (!airlock.CanChangeState())
|
||||
return;
|
||||
|
||||
@@ -133,6 +140,13 @@ namespace Content.Server.Doors.Systems
|
||||
{
|
||||
_wiresSystem.OpenUserInterface(uid, actor.PlayerSession);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.KeepOpenIfClicked)
|
||||
{
|
||||
// Disable auto close
|
||||
component.AutoClose = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user