v0.11.0.9

This commit is contained in:
Joonas Rikkonen
2020-12-09 16:34:16 +02:00
parent bbf06f0984
commit f433a7ba10
325 changed files with 13947 additions and 3652 deletions
@@ -40,7 +40,7 @@ namespace Barotrauma.Items.Components
{
get
{
if (recipientsDirty) RefreshRecipients();
if (recipientsDirty) { RefreshRecipients(); }
return recipients;
}
}
@@ -61,7 +61,7 @@ namespace Barotrauma.Items.Components
return "Connection (" + item.Name + ", " + Name + ")";
}
public Connection(XElement element, ConnectionPanel connectionPanel)
public Connection(XElement element, ConnectionPanel connectionPanel, IdRemap idRemap)
{
#if CLIENT
@@ -150,8 +150,11 @@ namespace Barotrauma.Items.Components
if (index == -1) break;
int id = subElement.GetAttributeInt("w", 0);
if (id < 0) id = 0;
wireId[index] = (ushort)id;
if (id < 0)
{
id = 0;
}
wireId[index] = idRemap.GetOffsetId(id);
break;
@@ -162,6 +165,11 @@ namespace Barotrauma.Items.Components
}
}
public void SetRecipientsDirty()
{
recipientsDirty = true;
}
private void RefreshRecipients()
{
recipients.Clear();
@@ -304,6 +312,7 @@ namespace Barotrauma.Items.Components
{
if (wires[i].Item.body != null) wires[i].Item.body.Enabled = false;
wires[i].Connect(this, false, false);
wires[i].FixNodeEnds();
}
}
}