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

rename the SMW properties "Recipe XP", "Recipe KP", and "Recipe duration" to "Activity XP", "Activity KP", and "Activity duration" so they can generate the same fields as Template:Profession info
(mostly done, minor formatting left (commas in numbes, decimal places, zero currency replacement))
(rename the SMW properties "Recipe XP", "Recipe KP", and "Recipe duration" to "Activity XP", "Activity KP", and "Activity duration" so they can generate the same fields as Template:Profession info)
(2 intermediate revisions by the same user not shown)
Line 17:
'?Uses item.Uses item #- = reagents',
'?Value = sell',
'?RecipeActivity XP = brewXP',
'?Uses item.RecipeActivity XP = prepXP',
'?RecipeActivity KP = brewKP',
'?Uses item.RecipeActivity KP = prepKP',
'?RecipeActivity duration = brewDuration',
'?Uses item.RecipeActivity duration = prepDuration',
'sort = Profession Level A'
}
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 215 ⟶ 217:
:wikitext(currency_cell(item.profitPerHour,item.hasProfit and item.hasDuration))
:tag('td')
:wikitext(item.XP,item.hasXP)
: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()
960

edits