From: Tyzemol <85772526+Tyzemol@users.noreply.github.com> Date: Tue, 9 May 2023 22:50:34 +0000 (+0500) Subject: Fix interlocking airlocks (#16265) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=b1f7d7f061bcb31847a344e21450cde549d2a0b0;p=space-station-14.git Fix interlocking airlocks (#16265) --- diff --git a/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs b/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs index dd29e8e2e3..a661fbd70b 100644 --- a/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs +++ b/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs @@ -148,17 +148,19 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem return; } - if (HasComp(target) && HasComp(configurator.ActiveDeviceLink) - || HasComp(target) && HasComp(configurator.ActiveDeviceLink)) + if (configurator.ActiveDeviceLink.HasValue + && (HasComp(target) + && HasComp(configurator.ActiveDeviceLink) + || HasComp(target) + && HasComp(configurator.ActiveDeviceLink))) { + OpenDeviceLinkUi(uid, target, user, configurator); return; } - if (configurator.ActiveDeviceLink.HasValue) - { - OpenDeviceLinkUi( uid, target, user, configurator); + if (HasComp(target) && HasComp(configurator.ActiveDeviceLink) + || HasComp(target) && HasComp(configurator.ActiveDeviceLink)) return; - } _popupSystem.PopupEntity(Loc.GetString("network-configurator-link-mode-started", ("device", Name(target.Value))), target.Value, user); configurator.ActiveDeviceLink = target;