locked chests can now be "shared" woth cooperation of the owner

This commit is contained in:
kaadmy 2015-10-18 15:28:50 -07:00
parent 9c314e0549
commit 87265d7165
1 changed files with 5 additions and 0 deletions

View File

@ -129,6 +129,11 @@ minetest.register_node(
local meta = minetest.get_meta(pos)
if not locks.is_locked(meta, player) then
if locks.is_owner(meta, player) then
-- also unlock when owner opens for "sharing" locked stuff
meta:set_float("last_lock_pick", minetest.get_gametime() + picked_time)
end
local np = pos.x .. "," .. pos.y .. "," .. pos.z
local form = default.ui.get_page("core_2part")
form = form .. "list[nodemeta:" .. np .. ";main;0.25,0.25;8,4;]"