diff --git a/Content.Server/Doors/WireActions/DoorBoltWireAction.cs b/Content.Server/Doors/WireActions/DoorBoltWireAction.cs index 8c356c23f7..e2d1c7beed 100644 --- a/Content.Server/Doors/WireActions/DoorBoltWireAction.cs +++ b/Content.Server/Doors/WireActions/DoorBoltWireAction.cs @@ -55,10 +55,17 @@ public class DoorBoltWireAction : BaseWireAction public override bool Pulse(EntityUid user, Wire wire) { - if (IsPowered(wire.Owner) - && EntityManager.TryGetComponent(wire.Owner, out var door)) + if (EntityManager.TryGetComponent(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; diff --git a/Content.Server/Wires/WiresSystem.cs b/Content.Server/Wires/WiresSystem.cs index f38dfa1e47..183732d664 100644 --- a/Content.Server/Wires/WiresSystem.cs +++ b/Content.Server/Wires/WiresSystem.cs @@ -23,7 +23,6 @@ namespace Content.Server.Wires; public sealed class WiresSystem : EntitySystem { - [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IPrototypeManager _protoMan = default!; [Dependency] private readonly AudioSystem _audioSystem = default!; [Dependency] private readonly UserInterfaceSystem _uiSystem = default!; @@ -33,6 +32,8 @@ public sealed class WiresSystem : EntitySystem [Dependency] private readonly HandsSystem _handsSystem = default!; [Dependency] private readonly DoAfterSystem _doAfter = default!; + private IRobustRandom _random = new RobustRandom(); + // This is where all the wire layouts are stored. [ViewVariables] private readonly Dictionary _layouts = new(); @@ -824,6 +825,7 @@ public sealed class WiresSystem : EntitySystem private void Reset(RoundRestartCleanupEvent args) { _layouts.Clear(); + _random = new RobustRandom(); } #endregion