Mechanical Pipes auto-connect in inactive area
CMrcm opened this issue ยท 10 comments
Thank you for your hard work on this mod. I found an issue (*feature?) which has caused a lot of headaches for myself and others on my server that I wanted to bring to your attention.
When placing Mechanical pipes, the entire connected chain of pipes updates with every one placed. This causes any pipes adjacent to the chain to check for a connection. Seems they use [IF empty AND IF adjacent NOT empty: connect]. This has become an issue in our more compact builds that require multiple liquids (eg Brine and Water) piped close together in which: laying a pipe down in an empty chain intending to connect to a water line updates the chain somewhere to connect to a nearby brine line, instantly filling the pipe with brine (instead of water).
To recreate the issue:
- pipe brine to machine A
- connect empty mechanical pipe to machine B (we'll call this the "pigtail")
- chain mechanical pipe from water source next to brine pipe (they won't connect with separate substance contained)
- connect water pipe to machine B's pigtail
This will cause all pipes in the brine/water adjacency to connect spontaneously, filling the entire complex fully with one of the substances.
What version of Mekanism are you using?
When placing Mechanical pipes, the entire connected chain of pipes updates with every one placed.
Not sure what you mean by that, but based on the the rest of your description I presume you are setting the connection between to lines to "none" with a configurator, if this is not the case I would highly recommend doing so to ensure they don't end up merging when one becomes empty, and if it is the case it might help to know that you can (or at least should be able to, not sure if it is broken as I haven't tested recently) be able to set the connection to none of the pipe that is already placed so that when you place another one it doesn't auto connect to that as the connection type is none.
Wow, thanks for the quick response!
Version is 10.0.9.432 for 1.16.1
We've found a way around it which is close to what you described. Just thought it would be good to have it on the books in case it wasn't intended as it's not very intuitive (no one connects a pipeline IRL and expects a disconnected pipe down the line to suddenly form a connection).
I'll try to get some pics to better illustrate the behavior.
The disconnected pipe down the line is because they become the same network at the pipe you place connecting there and reconnects any valid connections that were forced different because of contents down the line as they are the same network and a block update would cause them to reconnect so they get auto reconnected for you. It was actually a decent pain to get them connecting back together properly like that when the networks become valid for each other again, and it is because the networks aren't actually "disconnected" unless you manually set the connection to "none", they are just "disconnected" so that the contents don't end up getting voided (like they did at one point in 1.12 and earlier versions of MC) due to the pipes only having one buffer.
Here's the setup with the odd piping. All of the circled pipes have been set to Connect: None.
Next, we've knocked out the terminal pipes and replaced all but one with empty pipe.
When we attempt to connect the water network on the left, it updates and pulls in the brine network (that was set to Connect: None) on the right.
This can be avoided by not connecting an existing network to a separate, empty network, ensuring to only add to the existing network or connect to a terminal.
If you right click both networks with a network reader does it show that either of them are empty or does it show they have contents in them. Our pipes sometimes when they are transporting things show they have the contents of the thing being transported to show it is "moving" but doesn't actually have any of the contents actively stored in it for any length of time.
In my head it's a function that recurses down the chain and asks "is this connected?". If that's what's happening you might just turn that off and make people connect manually with a widget since it's acting uncontrollably (hopefully that's uncoupled from passing content information between blocks). Or delve into the depths to discover how it's making the connection decision and use content criteria in there (IF neighboring pipe contains same content as me then join, ELSE naw).
I dunno, just spitballing. Good luck and AGAIN thanks for all your hard work. It's a stellar mod even with pipe weirdness.
That sort of what happens currently (or is supposed to be). I tracked it down partially to the fact it was rechecking connections before updating the stored contents, so I have fixed that locally, but I now have to track down a different bug where the contents don't properly update/render and some connections don't visually show on the client (though they are correct on the server).