Module:Skills/Gathering: Difference between revisions

no edit summary
(_buildAstrologyConstellationTable: Amend for revised constellation modifier data format)
No edit summary
Line 12: Line 12:
local Skills = require('Module:Skills')
local Skills = require('Module:Skills')
local ItemSourceTables = require('Module:Items/SourceTables')
local ItemSourceTables = require('Module:Items/SourceTables')
local Num = require("Module:Number")


local function lootValueText(lootValue)
local function lootValueText(lootValue)
Line 83: Line 84:
  :attr('data-sort-value', Icons.getExpansionID(tree.id))
  :attr('data-sort-value', Icons.getExpansionID(tree.id))
  :css('text-align', 'center')
  :css('text-align', 'center')
:tag('td'):wikitext(Shared.formatnum(baseXP))
:tag('td'):wikitext(Num.formatnum(baseXP))
  :css('text-align', 'right')
  :css('text-align', 'right')
:tag('td'):wikitext(Shared.timeString(baseInt / 1000, true))
:tag('td'):wikitext(Shared.timeString(baseInt / 1000, true))
Line 257: Line 258:
  :attr('data-sort-value', Icons.getExpansionID(oreData.id))
  :attr('data-sort-value', Icons.getExpansionID(oreData.id))
  :css('text-align', 'center')
  :css('text-align', 'center')
:tag('td'):wikitext(Shared.formatnum(baseXP))
:tag('td'):wikitext(Num.formatnum(baseXP))
  :css('text-align', 'right')
  :css('text-align', 'right')
local respawn =  
local respawn =  
Line 421: Line 422:
:css('text-align', 'right')
:css('text-align', 'right')
:attr('data-sort-value', baseXP)
:attr('data-sort-value', baseXP)
:wikitext(Shared.formatnum(baseXP))
:wikitext(Num.formatnum(baseXP))
row:tag('td')
row:tag('td')
:attr('data-sort-value', fish.sellsFor)
:attr('data-sort-value', fish.sellsFor)
Line 602: Line 603:


if loot.minQuantity ~= loot.maxQuantity then
if loot.minQuantity ~= loot.maxQuantity then
table.insert(normalTxt, Shared.formatnum(loot.minQuantity) .. ' - ' .. Shared.formatnum(loot.maxQuantity))
table.insert(normalTxt, Num.formatnum(loot.minQuantity) .. ' - ' .. Num.formatnum(loot.maxQuantity))
else
else
table.insert(normalTxt, Shared.formatnum(loot.maxQuantity))
table.insert(normalTxt, Num.formatnum(loot.maxQuantity))
end
end


Line 678: Line 679:
local lineTxt = ''
local lineTxt = ''
lineTxt = lineTxt..'\r\n|-\r\n|'..Icons.Icon({thisItem.name, type='item'})
lineTxt = lineTxt..'\r\n|-\r\n|'..Icons.Icon({thisItem.name, type='item'})
lineTxt = lineTxt..'||data-sort-value="'..drop.quantity..'"| '..Shared.formatnum(drop.quantity)..'||data-sort-value="'..thisItem.sellsFor..'"|'..Items.getValueText(thisItem)
lineTxt = lineTxt..'||data-sort-value="'..drop.quantity..'"| '..Num.formatnum(drop.quantity)..'||data-sort-value="'..thisItem.sellsFor..'"|'..Items.getValueText(thisItem)
lineTxt = lineTxt..'||style="text-align:right"|'..Shared.fraction(1, 1/(SkillData.Thieving.baseAreaUniqueChance/100))
lineTxt = lineTxt..'||style="text-align:right"|'..Shared.fraction(1, 1/(SkillData.Thieving.baseAreaUniqueChance/100))
lineTxt = lineTxt..'||'..Shared.round(SkillData.Thieving.baseAreaUniqueChance, 2, 2)..'%'
lineTxt = lineTxt..'||'..Shared.round(SkillData.Thieving.baseAreaUniqueChance, 2, 2)..'%'
Line 768: Line 769:
         :attr('data-sort-value', Icons.getExpansionID(npc.id))
         :attr('data-sort-value', Icons.getExpansionID(npc.id))
         row:tag('td'):css('text-align', 'right')
         row:tag('td'):css('text-align', 'right')
             :wikitext(Shared.formatnum(baseXP))
             :wikitext(Num.formatnum(baseXP))
         row:tag('td'):css('text-align', 'right')
         row:tag('td'):css('text-align', 'right')
             :wikitext(Shared.formatnum(npc.maxHit * 10))
             :wikitext(Num.formatnum(npc.maxHit * 10))
         row:tag('td'):css('text-align', 'right')
         row:tag('td'):css('text-align', 'right')
             :attr('data-sort-value', npc.perception)
             :attr('data-sort-value', npc.perception)
             :wikitext(Shared.formatnum(npc.perception))
             :wikitext(Num.formatnum(npc.perception))
         row:tag('td'):attr('data-sort-value', currSortAmt)
         row:tag('td'):attr('data-sort-value', currSortAmt)
             :wikitext(p._getThievingNPCCurrencyText(npc))
             :wikitext(p._getThievingNPCCurrencyText(npc))
Line 921: Line 922:
  :css('text-align', 'center')
  :css('text-align', 'center')
  :attr('data-sort-value', Icons.getExpansionID(seedItem.id))
  :attr('data-sort-value', Icons.getExpansionID(seedItem.id))
:tag('td'):wikitext(Shared.formatnum(baseXP))
:tag('td'):wikitext(Num.formatnum(baseXP))
:tag('td'):attr('data-sort-value', (baseInt / 1000))
:tag('td'):attr('data-sort-value', (baseInt / 1000))
  :wikitext(Shared.timeString(baseInt / 1000, true))
  :wikitext(Shared.timeString(baseInt / 1000, true))
2,875

edits