Fixed relays burning out when connected to the main power grid. The changes in bb98767 caused relay components to be considered parts of whichever power grid they're connected to, causing their power and load to match the rest of the grid which usually causes them to go over the max power value. Closes #279

+ Fixed "powerConnections" field not being updated when creating PowerTransfer components mid-round, which made fabricated relays unusable for power transfer.
This commit is contained in:
Joonas Rikkonen
2018-02-24 20:46:28 +02:00
parent 127cc28af3
commit 6fcf2f573b
3 changed files with 56 additions and 57 deletions
@@ -41,28 +41,10 @@ namespace Barotrauma.Items.Components
Connection recipient = Wires[i].OtherConnection(this);
if (recipient != null) recipients.Add(recipient);
}
if (internalConnection != null) recipients.Add(internalConnection);
return recipients;
}
}
//another connection in the same connection panel
private Connection internalConnection;
public Connection InternalConnection
{
get
{
return internalConnection;
}
set
{
if (internalConnection != null) internalConnection.internalConnection = null;
internalConnection = value;
if (internalConnection != null) internalConnection.internalConnection = this;
}
}
public Item Item
{
get { return item; }