Module:Crafting: Difference between revisions
No edit summary |
I give up trying to make gifs work here for right now, I'll try again later once I understand Lua better Tag: Manual revert |
||
| (3 intermediate revisions by the same user not shown) | |||
| 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[item.name] then | |||
table.insert(retTable, item.name) | |||
table.insert(inputRetTable, item.name) | |||
if not usedNames[ | usedNames[item.name] = true | ||
table.insert(retTable, | |||
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. | ||