mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-12-29 17:17:29 +01:00
new_flow_logic/abms.lua: run_pump_intake(): use passed-in maxpressure instead of table lookup, pass through in abm_register.lua
This commit is contained in:
parent
21892456f5
commit
31741e33e2
@ -30,7 +30,7 @@ local register_abm_input = function(nodename, maxpressure)
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
pipeworks.flowlogic.run_pump_intake(pos, node)
|
||||
pipeworks.flowlogic.run_pump_intake(pos, node, maxpressure)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
@ -89,13 +89,10 @@ end
|
||||
|
||||
|
||||
|
||||
flowlogic.run_pump_intake = function(pos, node)
|
||||
flowlogic.run_pump_intake = function(pos, node, maxpressure)
|
||||
-- try to absorb nearby water nodes, but only up to limit.
|
||||
-- NB: check_for_liquids_v2 handles zero or negative from the following subtraction
|
||||
|
||||
local properties = pipeworks.flowables.inputs.list[node.name]
|
||||
local maxpressure = properties.maxpressure
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
local currentpressure = meta:get_float(label_pressure)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user