diff options
author | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-17 23:14:26 +0100 |
---|---|---|
committer | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-17 23:14:26 +0100 |
commit | 0a4d15d26ecc33315a5d088eace532ca3e539bbb (patch) | |
tree | 0172b1bc55cbf420bb5c1b0d5ebbbd6ed6f0ec89 /pressure_logic/flowable_node_registry_install.lua | |
parent | 909b321f3c6c866f686ae31dfc59a4a932f4d9c6 (diff) |
pressure logic: flowable node registry: add directionfn to directional flowable entries
Diffstat (limited to 'pressure_logic/flowable_node_registry_install.lua')
-rw-r--r-- | pressure_logic/flowable_node_registry_install.lua | 7 |
1 files changed, 5 insertions, 2 deletions
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 |