Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 2 tasks
NilanthAnimosus opened this issue Mar 7, 2024 · 2 comments
Assignees
Labels
Bug Something isn't working Code Programming task

Comments

@NilanthAnimosus
Copy link
Collaborator

NilanthAnimosus commented Mar 7, 2024

Disclaimers

  • 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 NilanthAnimosus added Bug Something isn't working Code Programming task labels Mar 7, 2024
@Regalis11 Regalis11 changed the title reconnecting a wire that has disconnected both sides removes the opposite connection Reconnecting a wire that has disconnected both sides removes the hanging wire at the opposite end Mar 9, 2024
@Regalis11 Regalis11 self-assigned this Mar 9, 2024
@Regalis11
Copy link
Collaborator

@Jasontti
Copy link
Collaborator

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
2024-05-30.11-51-14.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Code Programming task
Projects
None yet
Development

No branches or pull requests

3 participants