diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2014-01-01 12:26:33 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2014-01-01 12:26:33 -0500 |
commit | ddfc8173ac89e03b38ced53f095acf7fcb7e3249 (patch) | |
tree | 0a453cb8cd8f7f47c3f9f82ce86389086ed293a0 | |
parent | 394c2f6ea6fa5ce83eb8962a29424793d7d8cdf9 (diff) | |
download | pipeworks-ddfc8173ac89e03b38ced53f095acf7fcb7e3249.tar pipeworks-ddfc8173ac89e03b38ced53f095acf7fcb7e3249.tar.gz pipeworks-ddfc8173ac89e03b38ced53f095acf7fcb7e3249.tar.bz2 pipeworks-ddfc8173ac89e03b38ced53f095acf7fcb7e3249.tar.xz pipeworks-ddfc8173ac89e03b38ced53f095acf7fcb7e3249.zip |
always check for CONTENT_IGNORE around a pipe/tube before converting it
-rw-r--r-- | pipes.lua | 6 | ||||
-rw-r--r-- | tubes.lua | 6 |
2 files changed, 10 insertions, 2 deletions
@@ -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 @@ -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 |