From 251661fb5263d4f7a5c82028c3895af5f4d2d4c3 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Wed, 17 Jun 2015 17:59:50 +0200 Subject: [PATCH] Forbidden show of locked chests' inventories to people not owning them - Solves #90 --- minetestforfun_game/mods/default/nodes.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/minetestforfun_game/mods/default/nodes.lua b/minetestforfun_game/mods/default/nodes.lua index 7a9e90fe..4c4b9965 100755 --- a/minetestforfun_game/mods/default/nodes.lua +++ b/minetestforfun_game/mods/default/nodes.lua @@ -1754,7 +1754,6 @@ minetest.register_node("default:chest_locked", { end, on_construct = function(pos) local meta = minetest.get_meta(pos) - meta:set_string("formspec", get_locked_chest_formspec(pos)) meta:set_string("infotext", "Locked Chest") meta:set_string("owner", "") local inv = meta:get_inventory() @@ -1810,7 +1809,7 @@ minetest.register_node("default:chest_locked", { minetest.log("action", player:get_player_name().. " takes stuff from locked chest at "..minetest.pos_to_string(pos) .. ".") end, - --[[ Currently useless because the formspec is shown "on_construct" anyway + on_rightclick = function(pos, node, clicker) local meta = minetest.get_meta(pos) if has_locked_chest_privilege(meta, clicker) then @@ -1821,7 +1820,7 @@ minetest.register_node("default:chest_locked", { ) end end, - --]] + on_blast = function() end, })