Fix locked chests
This commit is contained in:
parent
5cd9526a70
commit
dd7b86e57f
@ -172,7 +172,7 @@ for _, mineral in ipairs(decor_minerals) do
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.env:get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main") and player:get_name() == meta:get_string("owner")
|
||||
return inv:is_empty("main") and player:get_player_name() == meta:get_string("owner")
|
||||
end,
|
||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
|
@ -405,7 +405,7 @@ function realtest.register_tree(name, TreeDef)
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.env:get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main") and player:get_name() == meta:get_string("owner")
|
||||
return inv:is_empty("main") and player:get_player_name() == meta:get_string("owner")
|
||||
end,
|
||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
|
Loading…
x
Reference in New Issue
Block a user