tool: check for protected areas (mod) also

master
Juraj Vajda 2018-12-11 18:46:43 -05:00
parent 97c4b93945
commit 49f1bec72e
1 changed files with 7 additions and 0 deletions

View File

@ -54,6 +54,13 @@ minetest.register_craftitem("protector:tool", {
pos.y = pos.y + vec.y
pos.z = pos.z + vec.z
-- areas
if not areas:canInteract(pos, name) then
minetest.chat_send_player(name, "Overlaps into another player protected area")
return
end
-- does placing a protector overlap existing area
if not protector.can_dig(r * 2, pos, user:get_player_name(), true, 3) then