Fixed relay components ignoring signals to the toggle and set_state connections if the signal has been passed through other PowerTransfer components. Closes #355

This commit is contained in:
Joonas Rikkonen
2018-04-06 19:51:16 +03:00
parent 22c3af6af6
commit 465b848cb4

View File

@@ -383,9 +383,9 @@ namespace Barotrauma.Items.Components
foreach (ItemComponent ic in recipient.Item.components)
{
//powertransfer components don't need to receive the signal because we relay it straight
//to the connected items without going through the whole chain of junction boxes
if (ic is PowerTransfer) continue;
//powertransfer components don't need to receive the signal in the pass-through signal connections
//because we relay it straight to the connected items without going through the whole chain of junction boxes
if (ic is PowerTransfer && connection.Name.Contains("signal")) continue;
ic.ReceiveSignal(stepsTaken, signal, recipient, source, sender, 0.0f);
}