forked from mtcontrib/pipeworks
new flow logic: flowable_node_registry_install.lua: add proper documentation for register.output_simple()
This commit is contained in:
parent
4f58a3039c
commit
31a67cf4f9
|
@ -79,12 +79,17 @@ register.output = function(nodename, upper, lower, outputfn)
|
||||||
regwarning("output node", nodename)
|
regwarning("output node", nodename)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TODOs here:
|
-- register a simple output:
|
||||||
-- The spigot's output behaviour (and possibly the fountain) could be abstracted out into a "simple output" of sorts,
|
-- drains pressure by attempting to place water in nearby nodes,
|
||||||
-- which tries to place water nodes around it.
|
-- which can be set by passing a list of offset vectors.
|
||||||
-- possibly this could be given a helper function to determine which faces a node should try,
|
-- will attempt to drain as many whole nodes as there are positions in the offset list.
|
||||||
-- to allow things like rotation or other param values determining "direction" to be respected.
|
|
||||||
-- for meanings of upper and lower, see register.output() above.
|
-- 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)
|
register.output_simple = function(nodename, upper, lower, neighbours)
|
||||||
local outputfn = pipeworks.flowlogic.helpers.make_neighbour_output_fixed(neighbours)
|
local outputfn = pipeworks.flowlogic.helpers.make_neighbour_output_fixed(neighbours)
|
||||||
register.output(nodename, upper, lower, outputfn)
|
register.output(nodename, upper, lower, outputfn)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user