Liquid Pumps: Fix issue with undetected pipe connection gaps
This commit is contained in:
parent
89d2e4b269
commit
916de1e3cc
@ -292,6 +292,7 @@ minetest.register_node("techage:ta4_doser", {
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
techage.remove_node(pos, oldnode, oldmetadata)
|
||||
Pipe:after_dig_node(pos)
|
||||
liquid.after_dig_pump(pos)
|
||||
techage.del_mem(pos)
|
||||
end,
|
||||
on_receive_fields = on_receive_fields,
|
||||
|
@ -105,6 +105,8 @@ minetest.register_node("techage:ta4_liquid_filter_filler", {
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
Pipe:after_dig_node(pos)
|
||||
liquid.after_dig_pump(pos)
|
||||
techage.del_mem(pos)
|
||||
end,
|
||||
|
||||
paramtype = "light",
|
||||
|
@ -117,6 +117,7 @@ minetest.register_node("techage:ta4_reactor_stand", {
|
||||
after_dig_node = function(pos, oldnode)
|
||||
Pipe:after_dig_node(pos)
|
||||
Cable:after_dig_node(pos)
|
||||
liquid.after_dig_pump(pos)
|
||||
techage.del_mem(pos)
|
||||
end,
|
||||
|
||||
|
@ -235,3 +235,14 @@ function liquid.update_network(pos, outdir)
|
||||
networks.node_connections(pos, Pipe)
|
||||
delete_netID(pos, outdir)
|
||||
end
|
||||
|
||||
-- To be called from each pump in 'after_dig_node'
|
||||
-- before calling 'techage.del_mem(pos)'
|
||||
function liquid.after_dig_pump(pos)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
if nvm.pipe2 and nvm.pipe2.netIDs then
|
||||
for outdir, netID in pairs(nvm.pipe2.netIDs) do
|
||||
networks.delete_network("pipe2", netID)
|
||||
end
|
||||
end
|
||||
end
|
@ -135,6 +135,7 @@ end
|
||||
|
||||
local function after_dig_node(pos, oldnode, oldmetadata, digger)
|
||||
Pipe:after_dig_node(pos)
|
||||
liquid.after_dig_pump(pos)
|
||||
techage.del_mem(pos)
|
||||
end
|
||||
|
||||
|
@ -126,6 +126,7 @@ end
|
||||
local function after_dig_node(pos, oldnode, oldmetadata, digger)
|
||||
Pipe:after_dig_node(pos)
|
||||
Cable:after_dig_node(pos)
|
||||
liquid.after_dig_pump(pos)
|
||||
techage.del_mem(pos)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user