summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com>2017-09-30 22:46:21 +0100
committerthetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com>2017-09-30 22:46:21 +0100
commit7498a32364fd859d6b735661fc3de4281f75389a (patch)
treedd8731df8f455f1e51d15a30076604b18b719166
parent8dfbcad949b7751d4ddb56f033d82c0432d2e112 (diff)
downloadpipeworks-7498a32364fd859d6b735661fc3de4281f75389a.tar
pipeworks-7498a32364fd859d6b735661fc3de4281f75389a.tar.gz
pipeworks-7498a32364fd859d6b735661fc3de4281f75389a.tar.bz2
pipeworks-7498a32364fd859d6b735661fc3de4281f75389a.tar.xz
pipeworks-7498a32364fd859d6b735661fc3de4281f75389a.zip
new_flow_logic.lua: fix callback crash due to check_for_liquids_v2() being moved to sub-table
-rw-r--r--new_flow_logic.lua6
1 files 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)