mirror of
https://github.com/SmallJoker/upgrade_packs.git
synced 2024-11-19 22:13:52 +01: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 list = inv:get_list("ugpacks")
|
||||
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))
|
||||
end
|
||||
inv:set_size("ugpacks", 0)
|
||||
|
Loading…
Reference in New Issue
Block a user