1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 01:30:38 +01:00

Forbidden show of locked chests' inventories to people not owning them

- Solves #90
This commit is contained in:
LeMagnesium 2015-06-17 17:59:50 +02:00
parent 9bd3f7d53f
commit 251661fb52

View File

@ -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,
})