trusted
167
edits
(Include ocean data, use GridIndex for component/building) |
(Sort recipes by GridIndex) |
||
Line 33: | Line 33: | ||
} | } | ||
local item = itemByName(name) | local item = itemByName(name) | ||
for _, recipe in pairs(recipesMakingByID(item.ID)) do | for _, recipe in pairs(recipeSort(recipesMakingByID(item.ID))) do | ||
table.insert(rtable, recipeRow(recipe, frame)) | table.insert(rtable, recipeRow(recipe, frame)) | ||
end | end | ||
Line 66: | Line 66: | ||
table.insert(output, '=== Components ===') | table.insert(output, '=== Components ===') | ||
table.insert(output, header) | table.insert(output, header) | ||
for _, recipe in pairs(components) do | for _, recipe in pairs(recipeSort(components)) do | ||
table.insert(output, recipeRow(recipe, frame)) | table.insert(output, recipeRow(recipe, frame)) | ||
end | end | ||
Line 74: | Line 74: | ||
table.insert(output, '=== Buildings ===') | table.insert(output, '=== Buildings ===') | ||
table.insert(output, header) | table.insert(output, header) | ||
for _, recipe in pairs(buildings) do | for _, recipe in pairs(recipeSort(buildings)) do | ||
table.insert(output, recipeRow(recipe, frame)) | table.insert(output, recipeRow(recipe, frame)) | ||
end | end | ||
Line 92: | Line 92: | ||
local item = itemByName(name) | local item = itemByName(name) | ||
local output = {} | local output = {} | ||
for _, r in pairs(recipesMakingByID(item.ID)) do | for _, r in pairs(recipeSort(recipesMakingByID(item.ID))) do | ||
table.insert(output, itemRecipe(r, frame)) | table.insert(output, itemRecipe(r, frame)) | ||
end | end |