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:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user