Module:Skills/Gathering: Difference between revisions

Changed format on getAxeTable slightly
(Testing new format for getAxeTable based on v0.19.1 code format)
(Changed format on getAxeTable slightly)
Line 17: Line 17:
   end
   end


   local result = '{| class="wikitable sortable"'
   local result = '{| class="wikitable"'
  result = result..'\r\n!colspan="4"| !!colspan="2"|Cut Time Decrease'
   result = result..'\r\n|- class="headerRow-0"'
   result = result..'\r\n|- class="headerRow-0"'
   result = result..'\r\n!colspan="2"|Name!!'..Icons.Icon({'Woodcutting', type='skill', notext=true})..' Level'
   result = result..'\r\n!colspan="2"|Name!!'..Icons.Icon({'Woodcutting', type='skill', notext=true})..' Level'
   result = result..'!!Cost!!Description'
   result = result..'!!Cost!!This Axe!!Total'
 
  local total = 0


   for i, axe in Shared.skpairs(axeArray) do
   for i, axe in Shared.skpairs(axeArray) do
Line 33: Line 36:
     result = result..'||style="text-align:right"|'..level
     result = result..'||style="text-align:right"|'..level
     result = result..'||style="text-align:right" data-sort-value="'..axe.cost.gp..'"|'..Icons.GP(axe.cost.gp)
     result = result..'||style="text-align:right" data-sort-value="'..axe.cost.gp..'"|'..Icons.GP(axe.cost.gp)
     result = result..'||'..axe.description
 
    local cutTime = axe.contains.modifiers.decreasedSkillIntervalPercent[1][2]
    total = total + cutTime
    result = result..'||style="text-align:right"|-'..cutTime..'%'
     result = result..'||style="text-align:right"|-'..total..'%'
   end
   end