initial stub patches to re-implement new_flow_logic

This commit is contained in:
thetaepsilon-gamedev 2017-09-27 14:14:33 +01:00
parent 2adcd3e777
commit f82570f580
2 changed files with 22 additions and 0 deletions

View File

@ -132,3 +132,11 @@ pipeworks.fountainhead_check = function(pos, node)
end end
end end
end end
local debuglog = function(msg)
print("## pipeworks: "..msg)
end
pipeworks.balance_pressure = function(pos, node)
debuglog("balance_pressure() stub! "..node.name.." at "..pos.x.." "..pos.y.." "..pos.z)
end

View File

@ -227,3 +227,17 @@ minetest.register_abm({
end end
}) })
-- run pressure balancing ABM over all water-moving nodes
local pipes_all_nodenames = pipes_full_nodenames
for _, pipe in ipairs(pipes_empty_nodenames) do
table.insert(pipes_all_nodenames, pipe)
end
minetest.register_abm({
nodenames = pipes_all_nodenames,
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
pipeworks.balance_pressure(pos, node)
end
})