Unstable v0.1300.0.2

This commit is contained in:
Markus Isberg
2021-03-12 15:57:04 +02:00
parent 0f6de8ada9
commit 874616027b
145 changed files with 1897 additions and 939 deletions
@@ -251,8 +251,8 @@ namespace Barotrauma.Items.Components
}
}
}
public void SendSignal(int stepsTaken, string signal, Item source, Character sender, float power, float signalStrength = 1.0f)
public void SendSignal(Signal signal)
{
for (int i = 0; i < MaxWires; i++)
{
@@ -260,16 +260,18 @@ namespace Barotrauma.Items.Components
Connection recipient = wires[i].OtherConnection(this);
if (recipient == null) { continue; }
if (recipient.item == this.item || recipient.item == source) { continue; }
if (recipient.item == this.item || signal.source?.LastSentSignalRecipients.LastOrDefault() == recipient.item) { continue; }
source?.LastSentSignalRecipients.Add(recipient.item);
signal.source?.LastSentSignalRecipients.Add(recipient.item);
Connection connection = recipient;
foreach (ItemComponent ic in recipient.item.Components)
{
ic.ReceiveSignal(stepsTaken, signal, recipient, source, sender, power, signalStrength);
ic.ReceiveSignal(signal, connection);
}
if (signal != "0")
if (signal.value != "0")
{
foreach (StatusEffect effect in recipient.Effects)
{
@@ -278,7 +280,7 @@ namespace Barotrauma.Items.Components
}
}
}
public void SendPowerProbeSignal(Item source, float power)
{
for (int i = 0; i < MaxWires; i++)