From 7498a32364fd859d6b735661fc3de4281f75389a Mon Sep 17 00:00:00 2001 From: thetaepsilon-gamedev Date: Sat, 30 Sep 2017 22:46:21 +0100 Subject: [PATCH] new_flow_logic.lua: fix callback crash due to check_for_liquids_v2() being moved to sub-table --- new_flow_logic.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/new_flow_logic.lua b/new_flow_logic.lua index a65ac23..7360668 100644 --- a/new_flow_logic.lua +++ b/new_flow_logic.lua @@ -33,7 +33,7 @@ end -- and returns it so that the receptacle can update it's pressure values. -- this should ensure that water blocks aren't vanished from existance. -- will take care of zero or negative-valued limits. -flowlogic.check_for_liquids_v2 = function(pos, limit) +local check_for_liquids_v2 = function(pos, limit) if not limit then limit = 6 end @@ -49,7 +49,7 @@ flowlogic.check_for_liquids_v2 = function(pos, limit) end return total end - +flowlogic.check_for_liquids_v2 = check_for_liquids_v2 @@ -100,7 +100,7 @@ flowlogic.run_pump_intake = function(pos, node) local currentpressure = meta:get_float(label_pressure) local intake_limit = maxpressure - currentpressure - local actual_intake = pipeworks.check_for_liquids_v2(pos, intake_limit) + local actual_intake = check_for_liquids_v2(pos, intake_limit) local newpressure = actual_intake + currentpressure -- debuglog("oldpressure "..currentpressure.." intake_limit "..intake_limit.." actual_intake "..actual_intake.." newpressure "..newpressure) meta:set_float(label_pressure, newpressure)