(932f9d67b) Fixed wire connections that have been done mid-round not working properly. Closes #1371
This commit is contained in:
@@ -169,20 +169,6 @@ namespace Barotrauma.Items.Components
|
||||
if (draggingConnected.Connect(this, !alreadyConnected, true))
|
||||
{
|
||||
var otherConnection = draggingConnected.OtherConnection(this);
|
||||
#if SERVER
|
||||
//TODO: ffs
|
||||
if (otherConnection == null)
|
||||
{
|
||||
GameServer.Log(Character.Controlled.LogName + " connected a wire to " +
|
||||
Item.Name + " (" + Name + ")", ServerLog.MessageType.ItemInteraction);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameServer.Log(Character.Controlled.LogName + " connected a wire from " +
|
||||
Item.Name + " (" + Name + ") to " + otherConnection.item.Name + " (" + otherConnection.Name + ")", ServerLog.MessageType.ItemInteraction);
|
||||
}
|
||||
#endif
|
||||
|
||||
SetWire(index, draggingConnected);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,6 +163,14 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
wires[index] = wire;
|
||||
recipientsDirty = true;
|
||||
if (wire != null)
|
||||
{
|
||||
var otherConnection = wire.OtherConnection(this);
|
||||
if (otherConnection != null)
|
||||
{
|
||||
otherConnection.recipientsDirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SendSignal(int stepsTaken, string signal, Item source, Character sender, float power, float signalStrength = 1.0f)
|
||||
|
||||
Reference in New Issue
Block a user