diff options
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({ |