diff options
author | tenplus1 <kinsellaja@yahoo.com> | 2015-05-27 15:57:19 +0100 |
---|---|---|
committer | tenplus1 <kinsellaja@yahoo.com> | 2015-05-27 15:57:19 +0100 |
commit | 8fdb475a1eb5d137ebaee57de22562f5a2a081b9 (patch) | |
tree | 246a20f70371241376e88b24779e1ff6b24ee613 /init.lua | |
parent | e98bc4bd6ed9b246bddbe43a25c0979e87d7385b (diff) |
Only owner can remove protectors
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -214,6 +214,12 @@ minetest.register_node("protector:protect", { end minetest.add_entity(pos, "protector:display") 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()) + end, }) minetest.register_craft({ @@ -274,6 +280,12 @@ minetest.register_node("protector:protect2", { end minetest.add_entity(pos, "protector:display") 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()) + end, }) minetest.register_craft({ |