allow admin to look in locked connected chest

This commit is contained in:
crabman77 2015-12-21 22:54:41 +01:00 committed by HybridDog
parent f2aa5c1c95
commit 757be92d92
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ chest_locked.on_metadata_inventory_take = function(pos, _, _, _, player)
end
chest_locked.on_rightclick = function(pos, _, clicker)
local meta = minetest.get_meta(pos)
if clicker:get_player_name() == meta:get_string("owner") then
if clicker:get_player_name() == meta:get_string("owner") or clicker:get_player_name() == minetest.setting_get("name") then
minetest.show_formspec(
clicker:get_player_name(),
"connected_chests:chest_locked_left",