From: Vanessa Ezekowitz Date: Wed, 1 Jan 2014 17:26:33 +0000 (-0500) Subject: always check for CONTENT_IGNORE around a pipe/tube before converting it X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=ddfc8173ac89e03b38ced53f095acf7fcb7e3249;p=zefram%2Fminetest%2Fpipeworks.git always check for CONTENT_IGNORE around a pipe/tube before converting it --- diff --git a/pipes.lua b/pipes.lua index 953bd55..20f770b 100644 --- a/pipes.lua +++ b/pipes.lua @@ -152,7 +152,11 @@ if REGISTER_COMPATIBILITY then interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) - pipeworks.scan_for_pipe_objects(pos) + 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) + end end }) end diff --git a/tubes.lua b/tubes.lua index c397b13..06cef17 100644 --- a/tubes.lua +++ b/tubes.lua @@ -205,7 +205,11 @@ if REGISTER_COMPATIBILITY then interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) - pipeworks.scan_for_tube_objects(pos) + 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) + end end }) end