summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortenplus1 <kinsellaja@yahoo.com>2015-04-27 08:15:04 +0100
committertenplus1 <kinsellaja@yahoo.com>2015-04-27 08:15:04 +0100
commitc586745f877ae213f66e139a2f1f6ff93677f65f (patch)
treeaee030a16a50350f9be1d15b8a8788792ee1dce2
parent192271c43240906bd18538d8d88b9b750353a01b (diff)
Fixed overlap bug
-rw-r--r--init.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index 45dc4d0..625fc93 100644
--- a/init.lua
+++ b/init.lua
@@ -100,8 +100,9 @@ protector.can_dig = function(r,pos,digger,onlyowner,infolevel)
{x=pos.x+r, y=pos.y+r, z=pos.z+r},
{"protector:protect", "protector:protect2"})
- if #positions > 0 then
- local meta = minetest.get_meta(positions[1])
+-- if #positions > 0 then
+ for _, pos in ipairs(positions) do
+ local meta = minetest.get_meta(pos) -- positions[1])
local owner = meta:get_string("owner")
local members = meta:get_string("members")
@@ -111,7 +112,7 @@ protector.can_dig = function(r,pos,digger,onlyowner,infolevel)
minetest.chat_send_player(digger,"This area is owned by "..owner.." !")
elseif infolevel == 2 then
minetest.chat_send_player(digger,"This area is owned by "..owner..".")
- minetest.chat_send_player(digger,"Protection located at: "..minetest.pos_to_string(positions[1]))
+ minetest.chat_send_player(digger,"Protection located at: "..minetest.pos_to_string(pos)) -- positions[1]))
if members ~= "" then
minetest.chat_send_player(digger,"Members: "..members..".")
end