mirror of
https://github.com/SmallJoker/upgrade_packs.git
synced 2024-08-19 21:04:11 +02:00
Fix itemstack serialization
This commit is contained in:
parent
291eca26be
commit
d1bed76864
3
api.lua
3
api.lua
@ -26,6 +26,9 @@ function upgrade_packs.inv_to_meta(player)
|
|||||||
local inv = player:get_inventory()
|
local inv = player:get_inventory()
|
||||||
local list = inv:get_list("ugpacks")
|
local list = inv:get_list("ugpacks")
|
||||||
if list and not inv:is_empty("ugpacks") then
|
if list and not inv:is_empty("ugpacks") then
|
||||||
|
for i, v in ipairs(list) do
|
||||||
|
list[i] = v:to_table()
|
||||||
|
end
|
||||||
meta:set_string("upgrade_packs:ugpacks", minetest.serialize(list))
|
meta:set_string("upgrade_packs:ugpacks", minetest.serialize(list))
|
||||||
end
|
end
|
||||||
inv:set_size("ugpacks", 0)
|
inv:set_size("ugpacks", 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user