From 31a67cf4f98f0c9850998799956063401efceef5 Mon Sep 17 00:00:00 2001 From: thetaepsilon-gamedev Date: Sat, 7 Oct 2017 13:15:42 +0100 Subject: new flow logic: flowable_node_registry_install.lua: add proper documentation for register.output_simple() --- new_flow_logic/flowable_node_registry_install.lua | 15 ++++++++++----- 1 file 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) -- cgit v1.2.3