Unstable 0.16.2.0
This commit is contained in:
@@ -1116,6 +1116,7 @@ namespace Barotrauma.Items.Components
|
||||
foreach (DockingPort dockingPort in DockingPort.List)
|
||||
{
|
||||
if (Level.Loaded != null && dockingPort.Item.Submarine.WorldPosition.Y > Level.Loaded.Size.Y) { continue; }
|
||||
if (dockingPort.Item.HiddenInGame) { continue; }
|
||||
if (dockingPort.Item.Submarine == null) { continue; }
|
||||
if (dockingPort.Item.Submarine.Info.IsWreck) { continue; }
|
||||
// docking ports should be shown even if defined as not, if the submarine is the same as the sonar's
|
||||
|
||||
@@ -682,7 +682,7 @@ namespace Barotrauma.Items.Components
|
||||
enterOutpostPrompt?.Close();
|
||||
}
|
||||
}
|
||||
else if (DockingSources.Any(d => d.Docked))
|
||||
else if (connectedPorts.Any(d => d.Docked))
|
||||
{
|
||||
dockingButton.Text = undockText;
|
||||
dockingContainer.Visible = true;
|
||||
@@ -819,7 +819,7 @@ namespace Barotrauma.Items.Components
|
||||
Connection dockingConnection = item.Connections?.FirstOrDefault(c => c.Name == "toggle_docking");
|
||||
if (dockingConnection != null)
|
||||
{
|
||||
connectedPorts = item.GetConnectedComponentsRecursive<DockingPort>(dockingConnection);
|
||||
connectedPorts = item.GetConnectedComponentsRecursive<DockingPort>(dockingConnection, ignoreInactiveRelays: true);
|
||||
}
|
||||
checkConnectedPortsTimer = CheckConnectedPortsInterval;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user