todo: update item for pressure logic directionality code

This commit is contained in:
thetaepsilon-gamedev 2017-10-18 12:06:00 +01:00
parent 0a97abcaf6
commit 38a893ec82

@ -1,7 +1,9 @@
-- Directionality code (in progress)
Currently, only "simple" flowable nodes exist, and they will always equalise pressure with all six neighbours.
A more sophisticated behaviour for this would be flowable node registration with some kind of custom callback, such that water can only flow into or out of these nodes in certain directions.
This would enable devices such as the airtight panels, sensor tubes and valves to have correct flow behaviour.
The flowable node class for directional nodes now exists and is hooked up in the code for determining valid neighbours in the flowable node ABM routines.
Pumps have been converted to this as part of the testing.
However, currently only the "raw" registration for this is available, and the pump definition registers it's own callback routines.
Helpers need to be added to flowable_node_registry_install.lua to abstract away the expression of which nodes can flow which ways - valves, flow sensors, spigots and entry panels, for instance, all currently rotate the same way using an upwards facedir, so a helper for these nodes would prevent code duplication.
-- (may not be possible) stop removing water nodes that were not placed by outputs when off
In non-finite mode, spigots and fountainheads will vanish water sources in their output positions, even if those output nodes did not place them there.