mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-10 12:30:27 +01:00
🐈
This commit is contained in:
parent
29994e917b
commit
c3e092cedb
|
@ -145,15 +145,10 @@ local function sort_inventory(inv)
|
|||
end
|
||||
end
|
||||
table.sort(typekeys)
|
||||
if #typekeys > #inlist then return end
|
||||
local empty_list = {}
|
||||
for i = 1, #inlist do
|
||||
empty_list[i] = ItemStack(nil)
|
||||
end
|
||||
inv:set_list("main", empty_list)
|
||||
for i = 1, #typekeys do
|
||||
for k = 1, #typecnt[typekeys[i]] do
|
||||
inv:add_item("main", typecnt[typekeys[i]][k])
|
||||
inv:set_list("main", {})
|
||||
for _, k in ipairs(typekeys) do
|
||||
for _, item in ipairs(typecnt[k]) do
|
||||
inv:add_item("main", item)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user