Module:Crafting: Difference between revisions
No edit summary |
No edit summary |
||
| Line 140: | Line 140: | ||
for _, item in pairs(itemSet) do | for _, item in pairs(itemSet) do | ||
--local name = item.mod .. ":" .. item.name -- use instead of just item.name if mods are covered | --local name = item.mod .. ":" .. item.name -- use instead of just item.name if mods are covered | ||
if not usedNames[ | |||
table.insert(retTable, | local gifflessname = item.name:gsub('%.gif$', '') | ||
table.insert(inputRetTable, | |||
usedNames[ | if not usedNames[gifflessname] then | ||
table.insert(retTable, gifflessname) | |||
table.insert(inputRetTable, gifflessname) | |||
usedNames[gifflessname] = true | |||
if aliases[ | if aliases[gifflessname] then | ||
for _, aliasEntry in ipairs(aliases[ | for _, aliasEntry in ipairs(aliases[gifflessname]) do | ||
if not usedNames[aliasEntry] then | if not usedNames[aliasEntry] then | ||
table.insert(retTable, (aliasEntry.name or aliasEntry)) -- Sometimes the alias entry is a table, so try and grab its name from within the table with a fallback to just the entry. | table.insert(retTable, (aliasEntry.name or aliasEntry)) -- Sometimes the alias entry is a table, so try and grab its name from within the table with a fallback to just the entry. | ||
| Line 160: | Line 163: | ||
local output_names, original_output_names = makeNameList(outputSets) | local output_names, original_output_names = makeNameList(outputSets) | ||
local ingredient_names, original_ingredient_names = makeNameList(ingredientSets | local ingredient_names, original_ingredient_names = makeNameList(ingredientSets) | ||
local group_names = {} | local group_names = {} | ||
if args.group then | if args.group then | ||