Look how it looks nice:
if data.raw["item-subgroup"]["bob-logistic-tier-1"] then -- bob
local subgroups = {}
for item_name, item in pairs (data.raw.item) do
local subgroup_name = item.subgroup
if subgroup_name then
if not subgroups[subgroup_name] then subgroups[subgroup_name] = {} end
table.insert (subgroups[subgroup_name], item_name)
end
end
log ('subgroups: ' .. serpent.block (subgroups))
end
Can you please also (if bob's mod available) sort items the same way?
Last subgroup tier by bob is:
["bob-logistic-tier-5"] = {
"ultimate-transport-belt",
"ultimate-underground-belt",
"ultimate-splitter",
"express-inserter",
"express-filter-inserter",
"express-stack-inserter",
"express-stack-filter-inserter",
"ultimate-miniloader",
"ultimate-filter-miniloader"
},