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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user