Add test for airlocks opening/closing and blocking entities (#1842)
* Add test for airlocks opening/closing and blocking entities * Nullable fix classic
This commit is contained in:
@@ -144,9 +144,9 @@ namespace Content.Server.GameObjects.Components.Doors
|
||||
}
|
||||
}
|
||||
|
||||
protected override DoorState State
|
||||
public override DoorState State
|
||||
{
|
||||
set
|
||||
protected set
|
||||
{
|
||||
base.State = value;
|
||||
// Only show the maintenance panel if the airlock is closed
|
||||
@@ -171,7 +171,11 @@ namespace Content.Server.GameObjects.Components.Doors
|
||||
|
||||
public override void OnRemove()
|
||||
{
|
||||
_powerReceiver.OnPowerStateChanged -= PowerDeviceOnOnPowerStateChanged;
|
||||
if (Owner.TryGetComponent(out _powerReceiver))
|
||||
{
|
||||
_powerReceiver.OnPowerStateChanged -= PowerDeviceOnOnPowerStateChanged;
|
||||
}
|
||||
|
||||
base.OnRemove();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user