mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-07-14 18:31:57 -04:00
Replace deprecated get_metadata()
calls (#3142)
This commit is contained in:
parent
9cb57ae5f2
commit
88ecab34d9
3 changed files with 4 additions and 4 deletions
|
@ -163,12 +163,12 @@ function default.chest.register_chest(prefixed_name, d)
|
|||
local itemstack = player:get_wielded_item()
|
||||
local key_meta = itemstack:get_meta()
|
||||
|
||||
if itemstack:get_metadata() == "" then
|
||||
if itemstack:get_meta():get_string("") == "" then
|
||||
return
|
||||
end
|
||||
|
||||
if key_meta:get_string("secret") == "" then
|
||||
key_meta:set_string("secret", minetest.parse_json(itemstack:get_metadata()).secret)
|
||||
key_meta:set_string("secret", minetest.parse_json(itemstack:get_meta():get_string("")).secret)
|
||||
itemstack:set_metadata("")
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue