mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-11-09 17:03:58 +01:00
new_flow_logic.lua: fix callback crash due to check_for_liquids_v2() being moved to sub-table
This commit is contained in:
parent
8dfbcad949
commit
7498a32364
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user