Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

Reconnecting a wire that has disconnected both sides removes the hanging wire at the opposite end

Open NilanthAnimosus opened this issue 1 year ago • 1 comments

Disclaimers

  • [X] I have searched the issue tracker to check if the issue has already been reported.
  • [ ] My issue happened while using mods.

What happened?

Expected the wire to connect but keep the hanging disconnected wire at the opposite connection in place. Alternatively expected it to act as if adding a new wire to offer placing the other end somewhere (Instead of connected to nowhere inside of a connection panel).

Alternatively, if a wire is disconnected both sides the beacon station should perhaps remove or drop that wire which would prevent this issue?

Reproduction steps

Known to occur sometimes in beacons so for reproduction:

1.) Set disconnection odds to 100% on wires in beacons (doable in Level.PrepareBeaconStation) In my case I added the code before the if (removeWireProbability > 0.0f && allowDisconnectedWires) line:

removeWireProbability = 1f;
allowDisconnectedWires = true;

2.) get a beacon mission, this occurs the same in singleplayer or servers so its not strictly syncing related. 3.) teleport to beacon and inspect something with 2 easily noted connections (IE. oxygen generator to junction) 4.) place one of the wires to a pin, check the other end and find the connection has disappeared along with the tracable inworld wire.

Bug prevalence

Happens regularly

Single player or multiplayer?

Happens in both single player and multiplayer

-

No response

Version

Other

-

1.2.12.0 (fix/beaconstation1and2-updates)

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

NilanthAnimosus avatar Mar 07 '24 15:03 NilanthAnimosus

Fixed in https://github.com/FakeFishGames/Barotrauma-development/commit/6cfacab80fb5f9b815d2fdbdfd6a85a0a5c3698e

Regalis11 avatar Mar 09 '24 09:03 Regalis11

Tested in: https://github.com/FakeFishGames/Barotrauma-development/pull/5046/commits/3311d8111c3c264332fec06fce3ac128bfd11e1d

Modified Level.cs with the instructions above with modification of changing removeWireProbability to disconnectWireProbability, it was recently changed. Tested normal in game wiring and in sub editor

Issue is fixed in singleplayer, but still present in multiplayer

Repro steps:

  1. Disconnect any wire from both ends in MP
  2. Reconnect either one of the ends

https://github.com/FakeFishGames/Barotrauma/assets/8488224/91b2777e-1bea-4b1f-aa61-0686c2ada172

Jasontti avatar May 30 '24 09:05 Jasontti

Tested in: https://github.com/FakeFishGames/Barotrauma-development/pull/5046/commits/04d55ffbe4d54bb2c7953d083d446255fbf1c3ef

Redid the previous tests, with focus on multiplayer. Tested couple circuitbox circuits and detaching/reattaching them.

No issues found, closing ticket as completed

Jasontti avatar Jun 06 '24 12:06 Jasontti