From 0a4d15d26ecc33315a5d088eace532ca3e539bbb Mon Sep 17 00:00:00 2001 From: thetaepsilon-gamedev Date: Tue, 17 Oct 2017 23:14:26 +0100 Subject: pressure logic: flowable node registry: add directionfn to directional flowable entries --- pressure_logic/flowable_node_registry_install.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pressure_logic/flowable_node_registry_install.lua') diff --git a/pressure_logic/flowable_node_registry_install.lua b/pressure_logic/flowable_node_registry_install.lua index a49c31a..3cd9c4d 100644 --- a/pressure_logic/flowable_node_registry_install.lua +++ b/pressure_logic/flowable_node_registry_install.lua @@ -43,9 +43,12 @@ end -- Register a node as a directional flowable: -- has a helper function which determines which nodes to consider valid neighbours. -register.directional = function(nodename, neighbourfn) +register.directional = function(nodename, neighbourfn, directionfn) insertbase(nodename) - pipeworks.flowables.list.directional[nodename] = { neighbourfn = neighbourfn } + pipeworks.flowables.list.directional[nodename] = { + neighbourfn = neighbourfn, + directionfn = directionfn + } regwarning("directional", nodename) end -- cgit v1.2.3