Rename intersects_protection to is_area_protected
authorSmallJoker <mk939@ymail.com>
Sun, 25 Feb 2018 11:30:36 +0000 (12:30 +0100)
committerparamat <mat.gregory@virginmedia.com>
Tue, 27 Feb 2018 01:16:37 +0000 (01:16 +0000)
mods/default/legacy.lua
mods/default/trees.lua

index 17e30360a7041356d6aff85060fbcce9224bb026..123fcd5e83b60443e3cfd6b4685a5e37304b954a 100644 (file)
@@ -41,6 +41,6 @@ default.register_chest = default.chest.register_chest
 -- Check for a volume intersecting protection
 function default.intersects_protection(minp, maxp, player_name, interval)
        minetest.log("warning", "default.intersects_protection() is " ..
-               "deprecated, use minetest.intersects_protection() instead.")
-       minetest.intersects_protection(minp, maxp, player_name, interval)
+               "deprecated, use minetest.is_area_protected() instead.")
+       minetest.is_area_protected(minp, maxp, player_name, interval)
 end
index f5ee8ca3c26a3598ff65d89372556ed4d1eae474..c4403096c53b8921ffd8494622d2cbed639c0a89 100644 (file)
@@ -504,7 +504,7 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
                return itemstack
        end
        -- Check tree volume for protection
-       if minetest.intersects_protection(
+       if minetest.is_area_protected(
                        vector.add(pos, minp_relative),
                        vector.add(pos, maxp_relative),
                        player_name,