Airlock bolt and deconstruction fixes (#11985)

This commit is contained in:
0x6273
2022-10-17 02:44:04 +02:00
committed by GitHub
parent a5a92c4dca
commit fe00c1c10b
9 changed files with 19 additions and 29 deletions

View File

@@ -38,18 +38,19 @@ public sealed class DoorBoltWireAction : BaseWireAction
{
if (EntityManager.TryGetComponent<AirlockComponent>(wire.Owner, out var door))
{
if (!door.BoltsDown)
{
door.BoltWireCut = true;
if (!door.BoltsDown && IsPowered(wire.Owner))
door.SetBoltsWithAudio(true);
}
}
return true;
}
// does nothing
public override bool Mend(EntityUid user, Wire wire)
{
if (EntityManager.TryGetComponent<AirlockComponent>(wire.Owner, out var door))
door.BoltWireCut = false;
return true;
}