by VanessaE » Sun Feb 15, 2015 04:00
I'd like to ask a favor of all singleplayer pipeworks users and server admins who have authority to alter servers' mod settings.
I've been working off and on on a branch in this mod called "new_flow_logic", where water in pipes is tracked and moved around explicitly and pipes change their visible state to reflect the presence of that water, rather than just pretending there's water and changing state if a neighbor does.
Originally I started that branch when Minetest gained finite water support, and lost interest when that support was dropped, but I decided to pick it up again. With much help from est31 and t4im (namely rebasing it and getting the code working again), I've brought it up-to-date and expanded it. Everything that works in master now seems to work in the new branch.
A few bugs in the old logic have been fixed here as well, such as flow sensors, valves, and entry panels picking up crossflow from a not-connected pipe above/below them, and fountains and spigots not shutting off when you dig the pipe feeding them. Also in this branch, valves, sensors and panels will re-orient themselves if a screwdriver gets used on them and they end up in an unusable orientation. The only things I haven't done anything with yet are the tanks and gratings, but they don't do anything in the "master" branch either.
Anyway, please try out the "new_flow_logic" branch and let me know how it behaves with your existing maps and pipelines as well as whatever new stuff you come up with. As the new logic uses metadata to track the water content of the pipes, and ABMs are still used to drive the pumps, spigots/fountains, and pressure averaging, there are several things to keep in mind that differ slightly from the master branch:
1. water propagates a little slower through the pipes, but not by much.
2. since water is stored as sort of a "pressure" value now, a pipeline that seems to only be partially "on" will still drive a spigot or fountain for a while after the pump is turned off.
3. placing too many spigots/fountains sequentially down a pipeline from a pump will cause the water to flow out of the ones closest to the pump first, leaving inadequate pressure to drive the ones that are further down the line.
4. existing pipelines that were showing as "on" before will probably revert to empty initially, and will take a while to "refill" as the pipes' metadata catches up.
5. pipes no longer just arbitrarily shut off: since a pipeline behaves as if it's always capped (as far as water flow is concerned anyway - we don't care about air that should theoretically be trapped in the pipe), a spigot or fountain must be attached to a pipeline in order to "drain" the pressure off.
6. A pump that's turned off will also gradually bleed-down the pressure in the circuit it is attached to.