mirror of
https://notabug.org/TenPlus1/protector.git
synced 2025-01-08 20:07:32 +01:00
Only owner and delprotect privelaged can remove protectors
This commit is contained in:
parent
8fdb475a1e
commit
fe08f89bf1
10
init.lua
10
init.lua
@ -58,7 +58,7 @@ protector.generate_formspec = function(meta)
|
|||||||
formspec = formspec .. "button["..(i%4*2+1.25)..","
|
formspec = formspec .. "button["..(i%4*2+1.25)..","
|
||||||
..math.floor(i/4+3)..";.75,.5;protector_del_member_"..member..";X]"
|
..math.floor(i/4+3)..";.75,.5;protector_del_member_"..member..";X]"
|
||||||
end
|
end
|
||||||
i = i +1
|
i = i + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
if i < npp then
|
if i < npp then
|
||||||
@ -216,9 +216,7 @@ minetest.register_node("protector:protect", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
can_dig = function(pos, player)
|
can_dig = function(pos, player)
|
||||||
local meta = minetest.get_meta(pos)
|
return protector.can_dig(1,pos,player:get_player_name(),true,1)
|
||||||
local inv = meta:get_inventory()
|
|
||||||
return (meta:get_string("owner") == player:get_player_name())
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -282,9 +280,7 @@ minetest.register_node("protector:protect2", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
can_dig = function(pos, player)
|
can_dig = function(pos, player)
|
||||||
local meta = minetest.get_meta(pos)
|
return protector.can_dig(1,pos,player:get_player_name(),true,1)
|
||||||
local inv = meta:get_inventory()
|
|
||||||
return (meta:get_string("owner") == player:get_player_name())
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user