Anonymous

Module:Skills: Difference between revisions

From Melvor Idle
Formatting fixes to getSmithingTable
(Initial pass at getSmithingTable)
(Formatting fixes to getSmithingTable)
Line 227: Line 227:
   local result = '{|class="wikitable sortable stickyHeader"'
   local result = '{|class="wikitable sortable stickyHeader"'
   result = result..'\r\n|-class="headerRow-0"'
   result = result..'\r\n|-class="headerRow-0"'
   result = result..'\r\n!Item!!Name!!'..Icons.Icon({'Smithing', 'skill', notext=true})..'!!XP!!Value!!Ingredients'
   result = result..'\r\n!Item!!Name!!'..Icons.Icon({'Smithing', type='skill', notext=true}).. Level'!!XP!!Value!!Ingredients'


   table.sort(smithList, function(a, b)
   table.sort(smithList, function(a, b)
Line 242: Line 242:
       result = result..item.smithingQty..'x '
       result = result..item.smithingQty..'x '
     end
     end
     result = result..'||[['..item.name..']]'
     result = result..'[['..item.name..']]'
     result = result..'||data-sort-value="'..item.smithingLevel..'"|'..Icons._SkillReq('Smithing', item.smithingLevel)
     result = result..'||data-sort-value="'..item.smithingLevel..'"|'..Icons._SkillReq('Smithing', item.smithingLevel)
     result = result..'||'..item.smithingXP
     result = result..'||'..item.smithingXP