Anonymous

Module:Items/UseTables: Difference between revisions

From Melvor Idle
Substitute links with Icons.Icon() where possible to benefit from ambiguous link handling
(herbloreLevel -> level to resolve a bunch of script errors)
(Substitute links with Icons.Icon() where possible to benefit from ambiguous link handling)
Line 515: Line 515:
     table.insert(resultPart, Icons.Icon({row.item.name, type=iconType, notext=true, size=50})..'||')
     table.insert(resultPart, Icons.Icon({row.item.name, type=iconType, notext=true, size=50})..'||')
     if qty > 1 then table.insert(resultPart, "'''"..qty.."x''' ") end
     if qty > 1 then table.insert(resultPart, "'''"..qty.."x''' ") end
     table.insert(resultPart, '[['..row.item.name..']]')
     table.insert(resultPart, Icons.Icon({row.item.name, type='item', noicon=true}))
     if row.skill == 'Upgrade' then
     if row.skill == 'Upgrade' then
       table.insert(resultPart, '||data-sort-value="Upgrade"|[[Upgrading Items|Upgrade]]')
       table.insert(resultPart, '||data-sort-value="Upgrade"|[[Upgrading Items|Upgrade]]')
Line 641: Line 641:
     local iconType = (spell.type == 'Auroras' and 'aurora') or (spell.type == 'Curses' and 'curse') or 'spell'
     local iconType = (spell.type == 'Auroras' and 'aurora') or (spell.type == 'Curses' and 'curse') or 'spell'
     table.insert(rowPart, Icons.Icon({spell.name, type=iconType, notext=true, size=50}))
     table.insert(rowPart, Icons.Icon({spell.name, type=iconType, notext=true, size=50}))
     table.insert(rowPart, '||[['..spell.name..']]')
     table.insert(rowPart, '||'..Icons.Icon({spell.name, type=iconType, noicon=true}))
     table.insert(rowPart, '||data-sort-value="'..spell.level..'"|'..Icons._SkillReq('Magic', spell.level))
     table.insert(rowPart, '||data-sort-value="'..spell.level..'"|'..Icons._SkillReq('Magic', spell.level))
     --Handle required items/dungeon clears
     --Handle required items/dungeon clears