add protection check for other mods (areas) when using tool
This commit is contained in:
@@ -102,6 +102,14 @@ minetest.register_craftitem("protector:tool", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- protection check for other mods like Areas
|
||||||
|
if minetest.is_protected(pos, name) then
|
||||||
|
minetest.chat_send_player(name,
|
||||||
|
"Cannot place protector, already protected at " ..
|
||||||
|
minetest.pos_to_string(pos))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- place protector
|
-- place protector
|
||||||
minetest.set_node(pos, {name = nod, param2 = 1})
|
minetest.set_node(pos, {name = nod, param2 = 1})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user