Module:Sandbox/User:Alsang/PotionList: Difference between revisions

remove KP columns, change alch icon
(mostly done, minor formatting left (commas in numbes, decimal places, zero currency replacement))
(remove KP columns, change alch icon)
Line 113:
-- XP/KP strings, if the requisite data isnt there then display "unknown"
if item.hasXP then
--item.xp = tostringlang:formatNum(item.xp) -- format to include commas
item.XP = item.XP -- format to include commas
else
item.XP = 'Unknown'
Line 119 ⟶ 120:
if item.hasKP then
item.KP = tostring(item.KP) .. '%' -- want 1 decimal place
else
item.KP = 'Unknown'
Line 125 ⟶ 126:
if item.hasXP and item.hasDuration then
item.XPPerHour = tostring(item.XPPerHour) -- format to include commas
else
item.XPPerHour = 'Unknown'
Line 131 ⟶ 132:
if item.hasKP and item.hasDuration then
item.KPPerHour = tostring(item.KPPerHour) -- want 2 decimal places
else
item.KPPerHour = 'Unknown'
Line 148 ⟶ 149:
:tag('tr')
:tag('th')
:wikitext('[[File:Alchemist small icon.png|15px]] Level')
:done()
:tag('th')
Line 180 ⟶ 181:
:tag('th')
:attr{ colspan = '10' }
:wikitext('ProfitCoins/XP')
:done()
:tag('th')
:wikitext('KP')
:done()
:tag('th')
:wikitext('KP/hr')
:done()
--:tag('th')
-- :wikitext('KP')
--:done()
--:tag('th')
-- :wikitext('KP/hr')
--:done()
:done()
Line 202 ⟶ 203:
:tag('tr')
:tag('td')
:css{ ['text-align'] = 'center' }
:wikitext('[[File:Alchemist small icon.png|15px]] ' .. item.lvl)
:wikitext(item.lvl)
:done()
:tag('td')
Line 221 ⟶ 223:
:done()
:wikitext(currency_cell(item.profitPerXP,item.hasXP and item.hasProfit))
--:tag('td')
-- :wikitext(item.KP)
--:done()
--:tag('td')
-- :wikitext(item.KPPerHour)
--:done()
:done()
929

edits