Anonymous

Module:Skills: Difference between revisions

From Melvor Idle
Fixed Firemaking table calls
(getThievingNavbox: Moved from Module:Navboxes)
(Fixed Firemaking table calls)
Line 284: Line 284:


   for i, logData in Shared.skpairs(SkillData.Firemaking) do
   for i, logData in Shared.skpairs(SkillData.Firemaking) do
    local name = Shared.titleCase(logData.type..' Logs')
  local logs = Items.getItemByID(logData.logID)
     local burnTime = logData.interval / 1000
    local name = logs.name
     local XPS = logData.xp / burnTime
    local burnTime = logData.baseInterval / 1000
     local XP_BF = logData.xp * (1 + logData.bonfireBonus / 100)
     local bonfireTime = logData.baseBonfireInterval / 1000
     local XPS = logData.baseXP / burnTime
     local XP_BF = logData.baseXP * (1 + logData.bonfireXPBonus / 100)
     local XPS_BF = XP_BF / burnTime
     local XPS_BF = XP_BF / burnTime


Line 293: Line 295:
     table.insert(resultPart, '\r\n|data-sort-value="'..name..'"|'..Icons.Icon({name, type='item', size='50', notext=true}))
     table.insert(resultPart, '\r\n|data-sort-value="'..name..'"|'..Icons.Icon({name, type='item', size='50', notext=true}))
     table.insert(resultPart, '||[['..name..']]')
     table.insert(resultPart, '||[['..name..']]')
     table.insert(resultPart, '||style ="text-align: right;"|'..logData.level)
     table.insert(resultPart, '||style ="text-align: right;"|'..logData.levelRequired)
     table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..burnTime..'"|'..Shared.timeString(burnTime, true))
     table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..burnTime..'"|'..Shared.timeString(burnTime, true))
     table.insert(resultPart, '||style ="text-align: right;"|'..logData.xp)
     table.insert(resultPart, '||style ="text-align: right;"|'..logData.baseXP)
     table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..XPS..'"|'..Shared.round(XPS, 2, 2))
     table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..XPS..'"|'..Shared.round(XPS, 2, 2))
     table.insert(resultPart, '||style ="text-align: right;"|'..Shared.round(XP_BF, 2, 0))
     table.insert(resultPart, '||style ="text-align: right;"|'..Shared.round(XP_BF, 2, 0))
     table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..XPS_BF..'"|'..Shared.round(XPS_BF, 2, 2))
     table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..XPS_BF..'"|'..Shared.round(XPS_BF, 2, 2))
     table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..logData.bonfireBonus..'"|'..logData.bonfireBonus..'%')
     table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..logData.bonfireXPBonus..'"|'..logData.bonfireXPBonus..'%')
     table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..logData.bonfireInterval..'"|'..Shared.timeString(logData.bonfireInterval / 1000, true))
     table.insert(resultPart, '||style ="text-align: right;" data-sort-value="'..bonfireTime..'"|'..Shared.timeString(bonfireTime, true))
   end
   end