Anonymous

Module:Skills: Difference between revisions

From Melvor Idle
Fixed sorting of farming seed/crop values
(Forgot to multiply heal value by 10)
(Fixed sorting of farming seed/crop values)
Line 75: Line 75:


   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!colspan=2|Seeds!!'..Icons.Icon({'Farming', type='skill', notext=true})..' Level'
   result = result..'\r\n!colspan=2|Seeds!!'..Icons.Icon({'Farming', type='skill', notext=true})..' Level'
   result = result..'!!XP!!Growth Time!!Seed Value'
   result = result..'!!XP!!Growth Time!!Seed Value'
Line 93: Line 93:
     result = result..'\r\n|'..Icons.Icon({seed.name, type='item', size='50', notext=true})..'||[['..seed.name..']]'
     result = result..'\r\n|'..Icons.Icon({seed.name, type='item', size='50', notext=true})..'||[['..seed.name..']]'
     result = result..'||'..seed.farmingLevel..'||'..Shared.formatnum(seed.farmingXP)
     result = result..'||'..seed.farmingLevel..'||'..Shared.formatnum(seed.farmingXP)
     result = result..'||'..Shared.timeString(seed.timeToGrow, true)..'||'..Icons.GP(seed.sellsFor)
     result = result..'||'..Shared.timeString(seed.timeToGrow, true)
    result = result..'||data-sort-value="'..seed.sellsFor..'"|'..Icons.GP(seed.sellsFor)


     local crop = Items.getItemByID(seed.grownItemID)
     local crop = Items.getItemByID(seed.grownItemID)
Line 100: Line 101:
       result = result..'||'..Icons.Icon({'Hitpoints', type='skill', notext=true})..' '..(crop.healsFor * 10)
       result = result..'||'..Icons.Icon({'Hitpoints', type='skill', notext=true})..' '..(crop.healsFor * 10)
     end
     end
     result = result..'||'..Icons.GP(crop.sellsFor)
     result = result..'||data-sort-value="'..crop.sellsFor..'"|'..Icons.GP(crop.sellsFor)
     result = result..'||'..Items._getItemSources(seed)
     result = result..'||'..Items._getItemSources(seed)
   end
   end