From: Whatstone <166147148+whatston3@users.noreply.github.com> Date: Sat, 21 Jun 2025 09:41:04 +0000 (-0400) Subject: SignalSwitchSystem: Check button is locked before toggling (#38474) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=54cb731147f59294b82654b0526c540c797c46a3;p=space-station-14.git SignalSwitchSystem: Check button is locked before toggling (#38474) Check button is locked before toggling --- diff --git a/Content.Server/DeviceLinking/Systems/SignalSwitchSystem.cs b/Content.Server/DeviceLinking/Systems/SignalSwitchSystem.cs index 67fad29d93..8a557049bc 100644 --- a/Content.Server/DeviceLinking/Systems/SignalSwitchSystem.cs +++ b/Content.Server/DeviceLinking/Systems/SignalSwitchSystem.cs @@ -1,6 +1,7 @@ using Content.Server.DeviceLinking.Components; using Content.Server.DeviceNetwork; using Content.Shared.Interaction; +using Content.Shared.Lock; using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; @@ -10,6 +11,7 @@ public sealed class SignalSwitchSystem : EntitySystem { [Dependency] private readonly DeviceLinkSystem _deviceLink = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; + [Dependency] private readonly LockSystem _lock = default!; public override void Initialize() { @@ -29,6 +31,9 @@ public sealed class SignalSwitchSystem : EntitySystem if (args.Handled || !args.Complex) return; + if (_lock.IsLocked(uid)) + return; + comp.State = !comp.State; _deviceLink.InvokePort(uid, comp.State ? comp.OnPort : comp.OffPort);