diff options
-rw-r--r-- | new_flow_logic/abms.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/new_flow_logic/abms.lua b/new_flow_logic/abms.lua index 99ccbc6..babd14e 100644 --- a/new_flow_logic/abms.lua +++ b/new_flow_logic/abms.lua @@ -81,6 +81,7 @@ flowlogic.run = function(pos, node) -- get the current pressure value. local nodepressure = get_pressure_access(pos) local currentpressure = nodepressure.get() + local oldpressure = currentpressure -- if node is an input: run intake phase local inputdef = pipeworks.flowables.inputs.list[nodename] @@ -100,6 +101,7 @@ flowlogic.run = function(pos, node) pos, node, currentpressure, + oldpressure, outputdef, finitemode) end @@ -213,7 +215,7 @@ end -flowlogic.run_output = function(pos, node, currentpressure, outputdef, finitemode) +flowlogic.run_output = function(pos, node, currentpressure, oldpressure, outputdef, finitemode) -- processing step for water output devices. -- takes care of checking a minimum pressure value and updating the resulting pressure level -- the outputfn is provided the current pressure and returns the pressure "taken". |