Wires patches (#7993)

* door bolts now set if power is off and wire is pulsed, makes WiresSystem get a new random every time the round restarts

* ??? what's shuffle doing in the interface ???

* oops
This commit is contained in:
Flipp Syder
2022-05-08 21:51:06 -07:00
committed by GitHub
parent ed429682ea
commit 7d5c109383
2 changed files with 13 additions and 4 deletions

View File

@@ -55,10 +55,17 @@ public class DoorBoltWireAction : BaseWireAction
public override bool Pulse(EntityUid user, Wire wire)
{
if (IsPowered(wire.Owner)
&& EntityManager.TryGetComponent<AirlockComponent>(wire.Owner, out var door))
if (EntityManager.TryGetComponent<AirlockComponent>(wire.Owner, out var door))
{
door.SetBoltsWithAudio(!door.BoltsDown);
if (IsPowered(wire.Owner))
{
door.SetBoltsWithAudio(!door.BoltsDown);
}
else if (!door.BoltsDown)
{
door.SetBoltsWithAudio(true);
}
}
return true;