Module:Crafting: Difference between revisions
No edit summary |
No edit summary |
||
| Line 141: | Line 141: | ||
--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[item.name] then | |||
table.insert(retTable, item.name) | |||
if not usedNames[ | table.insert(inputRetTable, item.name) | ||
table.insert(retTable, | usedNames[item.name] = true | ||
table.insert(inputRetTable, | |||
usedNames[ | |||
if aliases[ | if aliases[item.name] then | ||
for _, aliasEntry in ipairs(aliases[ | for _, aliasEntry in ipairs(aliases[item.name]) 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 167: | Line 165: | ||
if args.group then | if args.group then | ||
for name in string.gmatch(args.group, "[^,]+") do | for name in string.gmatch(args.group, "[^,]+") do | ||
table.insert(group_names, mw.text.trim(name)) | table.insert(group_names, mw.text.trim(name):gsub('%.gif$', '')) | ||
end | end | ||
end | end | ||