mirror of
https://github.com/HybridDog/connected_chests.git
synced 2024-12-28 06:00:17 +01:00
allow admin to look in locked connected chest
This commit is contained in:
parent
8f268bfaac
commit
c9e632b1b8
2
init.lua
2
init.lua
@ -209,7 +209,7 @@ chest_locked.on_metadata_inventory_take = function(pos, _, _, _, player)
|
|||||||
end
|
end
|
||||||
chest_locked.on_rightclick = function(pos, _, clicker)
|
chest_locked.on_rightclick = function(pos, _, clicker)
|
||||||
local meta = minetest.get_meta(pos)
|
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(
|
minetest.show_formspec(
|
||||||
clicker:get_player_name(),
|
clicker:get_player_name(),
|
||||||
"connected_chests:chest_locked_left",
|
"connected_chests:chest_locked_left",
|
||||||
|
Loading…
Reference in New Issue
Block a user