mirror of
https://notabug.org/TenPlus1/protector.git
synced 2025-01-07 23:07:29 +01:00
Fixed overlap bug
This commit is contained in:
parent
192271c432
commit
c586745f87
7
init.lua
7
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},
|
{x=pos.x+r, y=pos.y+r, z=pos.z+r},
|
||||||
{"protector:protect", "protector:protect2"})
|
{"protector:protect", "protector:protect2"})
|
||||||
|
|
||||||
if #positions > 0 then
|
-- if #positions > 0 then
|
||||||
local meta = minetest.get_meta(positions[1])
|
for _, pos in ipairs(positions) do
|
||||||
|
local meta = minetest.get_meta(pos) -- positions[1])
|
||||||
local owner = meta:get_string("owner")
|
local owner = meta:get_string("owner")
|
||||||
local members = meta:get_string("members")
|
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.." !")
|
minetest.chat_send_player(digger,"This area is owned by "..owner.." !")
|
||||||
elseif infolevel == 2 then
|
elseif infolevel == 2 then
|
||||||
minetest.chat_send_player(digger,"This area is owned by "..owner..".")
|
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
|
if members ~= "" then
|
||||||
minetest.chat_send_player(digger,"Members: "..members..".")
|
minetest.chat_send_player(digger,"Members: "..members..".")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user