ECS airlocks (#13500)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using Content.Server.Doors.Components;
|
||||
using Content.Server.Wires;
|
||||
using Content.Shared.Doors;
|
||||
using Content.Shared.Doors.Components;
|
||||
using Content.Shared.Doors.Systems;
|
||||
using Content.Shared.Wires;
|
||||
|
||||
namespace Content.Server.Doors;
|
||||
@@ -47,7 +49,7 @@ public sealed class DoorSafetyWireAction : BaseWireAction
|
||||
if (EntityManager.TryGetComponent<AirlockComponent>(wire.Owner, out var door))
|
||||
{
|
||||
WiresSystem.TryCancelWireAction(wire.Owner, PulseTimeoutKey.Key);
|
||||
door.Safety = false;
|
||||
EntityManager.System<SharedAirlockSystem>().SetSafety(door, false);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -58,7 +60,7 @@ public sealed class DoorSafetyWireAction : BaseWireAction
|
||||
base.Mend(user, wire);
|
||||
if (EntityManager.TryGetComponent<AirlockComponent>(wire.Owner, out var door))
|
||||
{
|
||||
door.Safety = true;
|
||||
EntityManager.System<SharedAirlockSystem>().SetSafety(door, true);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -69,7 +71,7 @@ public sealed class DoorSafetyWireAction : BaseWireAction
|
||||
base.Pulse(user, wire);
|
||||
if (EntityManager.TryGetComponent<AirlockComponent>(wire.Owner, out var door))
|
||||
{
|
||||
door.Safety = false;
|
||||
EntityManager.System<SharedAirlockSystem>().SetSafety(door, false);
|
||||
WiresSystem.StartWireAction(wire.Owner, _timeout, PulseTimeoutKey.Key, new TimedWireEvent(AwaitSafetyTimerFinish, wire));
|
||||
}
|
||||
|
||||
@@ -90,7 +92,7 @@ public sealed class DoorSafetyWireAction : BaseWireAction
|
||||
{
|
||||
if (EntityManager.TryGetComponent<AirlockComponent>(wire.Owner, out var door))
|
||||
{
|
||||
door.Safety = true;
|
||||
EntityManager.System<SharedAirlockSystem>().SetSafety(door, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user