diff options
author | tenplus1 <kinsellaja@yahoo.com> | 2015-05-27 18:15:04 +0100 |
---|---|---|
committer | tenplus1 <kinsellaja@yahoo.com> | 2015-05-27 18:15:04 +0100 |
commit | fe08f89bf15cbb82b2be76e92803759349695c27 (patch) | |
tree | 7c1d15eea178b457a10d42570f7dc7c39e1b0e58 | |
parent | 8fdb475a1eb5d137ebaee57de22562f5a2a081b9 (diff) |
Only owner and delprotect privelaged can remove protectors
-rw-r--r-- | init.lua | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -58,7 +58,7 @@ protector.generate_formspec = function(meta) formspec = formspec .. "button["..(i%4*2+1.25).."," ..math.floor(i/4+3)..";.75,.5;protector_del_member_"..member..";X]" end - i = i +1 + i = i + 1 end if i < npp then @@ -216,9 +216,7 @@ minetest.register_node("protector:protect", { end, can_dig = function(pos, player) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - return (meta:get_string("owner") == player:get_player_name()) + return protector.can_dig(1,pos,player:get_player_name(),true,1) end, }) @@ -282,9 +280,7 @@ minetest.register_node("protector:protect2", { end, can_dig = function(pos, player) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - return (meta:get_string("owner") == player:get_player_name()) + return protector.can_dig(1,pos,player:get_player_name(),true,1) end, }) |