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:
DrSmugleaf
2020-08-22 12:30:30 +02:00
committed by GitHub
parent 4fa4e42462
commit efbd01d0bf
6 changed files with 230 additions and 10 deletions

View File

@@ -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();
}