summaryrefslogtreecommitdiff
path: root/new_flow_logic
diff options
context:
space:
mode:
authorthetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com>2017-10-07 13:15:42 +0100
committerthetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com>2017-10-07 13:15:42 +0100
commit31a67cf4f98f0c9850998799956063401efceef5 (patch)
treec555cfd9682d75577c4f5f6b1f4070241fb4b6e6 /new_flow_logic
parent4f58a3039c55783978d5f85fbf59f06025884384 (diff)
downloadpipeworks-31a67cf4f98f0c9850998799956063401efceef5.tar
pipeworks-31a67cf4f98f0c9850998799956063401efceef5.tar.gz
pipeworks-31a67cf4f98f0c9850998799956063401efceef5.tar.bz2
pipeworks-31a67cf4f98f0c9850998799956063401efceef5.tar.xz
pipeworks-31a67cf4f98f0c9850998799956063401efceef5.zip
new flow logic: flowable_node_registry_install.lua: add proper documentation for register.output_simple()
Diffstat (limited to 'new_flow_logic')
-rw-r--r--new_flow_logic/flowable_node_registry_install.lua15
1 files changed, 10 insertions, 5 deletions
diff --git a/new_flow_logic/flowable_node_registry_install.lua b/new_flow_logic/flowable_node_registry_install.lua
index 7f414c4..650d1da 100644
--- a/new_flow_logic/flowable_node_registry_install.lua
+++ b/new_flow_logic/flowable_node_registry_install.lua
@@ -79,12 +79,17 @@ register.output = function(nodename, upper, lower, outputfn)
regwarning("output node", nodename)
end
--- TODOs here:
--- The spigot's output behaviour (and possibly the fountain) could be abstracted out into a "simple output" of sorts,
--- which tries to place water nodes around it.
--- possibly this could be given a helper function to determine which faces a node should try,
--- to allow things like rotation or other param values determining "direction" to be respected.
+-- register a simple output:
+-- drains pressure by attempting to place water in nearby nodes,
+-- which can be set by passing a list of offset vectors.
+-- will attempt to drain as many whole nodes as there are positions in the offset list.
-- for meanings of upper and lower, see register.output() above.
+-- non-finite mode:
+-- above upper pressure: places water sources as appropriate, keeps draining pressure.
+-- below lower presssure: removes it's neighbour water sources.
+-- finite mode:
+-- same as for above pressure in non-finite mode,
+-- but only drains pressure when water source nodes are actually placed.
register.output_simple = function(nodename, upper, lower, neighbours)
local outputfn = pipeworks.flowlogic.helpers.make_neighbour_output_fixed(neighbours)
register.output(nodename, upper, lower, outputfn)