Fixed relay components not carrying power & deactivated (CanTransfer = false or IsActive = false) PowerTransfer components still carrying power

This commit is contained in:
Joonas Rikkonen
2018-01-17 21:25:52 +02:00
parent f5dbbf0735
commit 965eef365b
3 changed files with 43 additions and 8 deletions
@@ -41,10 +41,28 @@ 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; }