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:
parent
9bd3f7d53f
commit
251661fb52
@ -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,
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user