pressure logic: flowable node registry: add directionfn to directional flowable entries

This commit is contained in:
thetaepsilon-gamedev
2017-10-17 23:14:26 +01:00
parent 909b321f3c
commit 0a4d15d26e
2 changed files with 15 additions and 15 deletions

View File

@ -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