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;
}
if (HasComp<DeviceLinkSourceComponent>(target) && HasComp<DeviceLinkSourceComponent>(configurator.ActiveDeviceLink)
|| HasComp<DeviceLinkSinkComponent>(target) && HasComp<DeviceLinkSinkComponent>(configurator.ActiveDeviceLink))
if (configurator.ActiveDeviceLink.HasValue
&& (HasComp<DeviceLinkSourceComponent>(target)
&& HasComp<DeviceLinkSinkComponent>(configurator.ActiveDeviceLink)
|| HasComp<DeviceLinkSinkComponent>(target)
&& HasComp<DeviceLinkSourceComponent>(configurator.ActiveDeviceLink)))
{
OpenDeviceLinkUi(uid, target, user, configurator);
return;
}
if (configurator.ActiveDeviceLink.HasValue)
{
OpenDeviceLinkUi( uid, target, user, configurator);
if (HasComp<DeviceLinkSourceComponent>(target) && HasComp<DeviceLinkSourceComponent>(configurator.ActiveDeviceLink)
|| HasComp<DeviceLinkSinkComponent>(target) && HasComp<DeviceLinkSinkComponent>(configurator.ActiveDeviceLink))
return;
}
_popupSystem.PopupEntity(Loc.GetString("network-configurator-link-mode-started", ("device", Name(target.Value))), target.Value, user);
configurator.ActiveDeviceLink = target;