A reference to the character who triggered a signal is passed to all the recipients of the signal. Allows more accurate server logging: using doors, docking ports or turrets is now properly logged.
This commit is contained in:
@@ -165,13 +165,13 @@ namespace Barotrauma.Items.Components
|
||||
UpdateAutoPilot(deltaTime);
|
||||
}
|
||||
|
||||
item.SendSignal(0, targetVelocity.X.ToString(CultureInfo.InvariantCulture), "velocity_x_out");
|
||||
item.SendSignal(0, targetVelocity.X.ToString(CultureInfo.InvariantCulture), "velocity_x_out", null);
|
||||
|
||||
float targetLevel = -targetVelocity.Y;
|
||||
|
||||
targetLevel += (neutralBallastLevel - 0.5f) * 100.0f;
|
||||
|
||||
item.SendSignal(0, targetLevel.ToString(CultureInfo.InvariantCulture), "velocity_y_out");
|
||||
item.SendSignal(0, targetLevel.ToString(CultureInfo.InvariantCulture), "velocity_y_out", null);
|
||||
|
||||
|
||||
voltage -= deltaTime;
|
||||
@@ -476,7 +476,7 @@ namespace Barotrauma.Items.Components
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void ReceiveSignal(int stepsTaken, string signal, Connection connection, Item sender, float power=0.0f)
|
||||
public override void ReceiveSignal(int stepsTaken, string signal, Connection connection, Item source, Character sender, float power=0.0f)
|
||||
{
|
||||
if (connection.Name == "velocity_in")
|
||||
{
|
||||
@@ -484,7 +484,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
else
|
||||
{
|
||||
base.ReceiveSignal(stepsTaken, signal, connection, sender, power);
|
||||
base.ReceiveSignal(stepsTaken, signal, connection, source, sender, power);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user