(965c31410) v0.10.4.0

This commit is contained in:
Joonas Rikkonen
2020-07-30 13:00:09 +03:00
parent eeac247a8e
commit 4978af3d60
539 changed files with 45803 additions and 25359 deletions
@@ -64,7 +64,14 @@ namespace Barotrauma.Items.Components
partial void InitProjSpecific(XElement element);
private bool linksInitialized;
public override void OnMapLoaded()
{
if (linksInitialized) { return; }
InitializeLinks();
}
public void InitializeLinks()
{
foreach (Connection c in Connections)
{
@@ -90,6 +97,8 @@ namespace Barotrauma.Items.Components
}
}
}
linksInitialized = true;
}
public override void OnItemLoaded()
@@ -260,6 +269,7 @@ namespace Barotrauma.Items.Components
protected override void RemoveComponentSpecific()
{
base.RemoveComponentSpecific();
foreach (Wire wire in DisconnectedWires.ToList())
{
if (wire.OtherConnection(null) == null) //wire not connected to anything else