From b1f7d7f061bcb31847a344e21450cde549d2a0b0 Mon Sep 17 00:00:00 2001 From: Tyzemol <85772526+Tyzemol@users.noreply.github.com> Date: Wed, 10 May 2023 03:50:34 +0500 Subject: [PATCH] Fix interlocking airlocks (#16265) --- .../Systems/NetworkConfiguratorSystem.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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; -- 2.51.2