Fix interlocking airlocks (#16265)

This commit is contained in:
Tyzemol
2023-05-10 03:50:34 +05:00
committed by GitHub
parent e94d36f51a
commit b1f7d7f061

View File

@@ -148,17 +148,19 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
return; return;
} }
if (HasComp<DeviceLinkSourceComponent>(target) && HasComp<DeviceLinkSourceComponent>(configurator.ActiveDeviceLink) if (configurator.ActiveDeviceLink.HasValue
|| HasComp<DeviceLinkSinkComponent>(target) && HasComp<DeviceLinkSinkComponent>(configurator.ActiveDeviceLink)) && (HasComp<DeviceLinkSourceComponent>(target)
&& HasComp<DeviceLinkSinkComponent>(configurator.ActiveDeviceLink)
|| HasComp<DeviceLinkSinkComponent>(target)
&& HasComp<DeviceLinkSourceComponent>(configurator.ActiveDeviceLink)))
{ {
OpenDeviceLinkUi(uid, target, user, configurator);
return; return;
} }
if (configurator.ActiveDeviceLink.HasValue) if (HasComp<DeviceLinkSourceComponent>(target) && HasComp<DeviceLinkSourceComponent>(configurator.ActiveDeviceLink)
{ || HasComp<DeviceLinkSinkComponent>(target) && HasComp<DeviceLinkSinkComponent>(configurator.ActiveDeviceLink))
OpenDeviceLinkUi( uid, target, user, configurator);
return; return;
}
_popupSystem.PopupEntity(Loc.GetString("network-configurator-link-mode-started", ("device", Name(target.Value))), target.Value, user); _popupSystem.PopupEntity(Loc.GetString("network-configurator-link-mode-started", ("device", Name(target.Value))), target.Value, user);
configurator.ActiveDeviceLink = target; configurator.ActiveDeviceLink = target;