mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-06 13:54:25 -04:00
Allow non-players to dig locked chests.
This commit is contained in:
parent
f6699c9f12
commit
ea26c4ffdd
1 changed files with 5 additions and 1 deletions
|
@ -1410,7 +1410,11 @@ local function get_locked_chest_formspec(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function has_locked_chest_privilege(meta, player)
|
local function has_locked_chest_privilege(meta, player)
|
||||||
if player:get_player_name() ~= meta:get_string("owner") then
|
local name = ""
|
||||||
|
if player then
|
||||||
|
name = player:get_player_name()
|
||||||
|
end
|
||||||
|
if name ~= meta:get_string("owner") then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Add table
Reference in a new issue