forked from mtcontrib/pipeworks
always check for CONTENT_IGNORE around a pipe/tube before converting it
This commit is contained in:
parent
394c2f6ea6
commit
ddfc8173ac
@ -152,8 +152,12 @@ if REGISTER_COMPATIBILITY then
|
|||||||
interval = 1,
|
interval = 1,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
local minp = {x = pos.x-1, y = pos.y-1, z = pos.z-1}
|
||||||
|
local maxp = {x = pos.x+1, y = pos.y+1, z = pos.z+1}
|
||||||
|
if table.getn(minetest.find_nodes_in_area(minp, maxp, "ignore")) == 0 then
|
||||||
pipeworks.scan_for_pipe_objects(pos)
|
pipeworks.scan_for_pipe_objects(pos)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -205,8 +205,12 @@ if REGISTER_COMPATIBILITY then
|
|||||||
interval = 1,
|
interval = 1,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
local minp = {x = pos.x-1, y = pos.y-1, z = pos.z-1}
|
||||||
|
local maxp = {x = pos.x+1, y = pos.y+1, z = pos.z+1}
|
||||||
|
if table.getn(minetest.find_nodes_in_area(minp, maxp, "ignore")) == 0 then
|
||||||
pipeworks.scan_for_tube_objects(pos)
|
pipeworks.scan_for_tube_objects(pos)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user