2,877
edits
No edit summary |
No edit summary |
||
Line 46: | Line 46: | ||
local cookIcon = Icons._SkillRealmIcon('Cooking', realm.id) | local cookIcon = Icons._SkillRealmIcon('Cooking', realm.id) | ||
local perfectIcon = Icons.Icon({'Perfect', type='bonus', ext='png', notext=true, nolink=true}) | local perfectIcon = Icons.Icon({'Perfect', type='bonus', ext='png', notext=true, nolink=true, size=20}) | ||
local healIcon = Icons.Icon({"Hitpoints", type="skill", notext=true, nolink=true}) | local healIcon = Icons.Icon({"Hitpoints", type="skill", notext=true, nolink=true, size=20}) | ||
-- Only include time for cooking fire, as the other options have a fixed interval. | |||
local includeTime = category == "Cooking Fire" | |||
local html = mw.html.create('table') | local html = mw.html.create('table') | ||
:addClass('wikitable sortable stickyHeader') | :addClass('wikitable sortable stickyHeader') | ||
html:tag('tr'):addClass("headerRow-0") | local header0 = html:tag('tr'):addClass("headerRow-0") | ||
header0 :tag('th'):wikitext('Cooked Item') | |||
:attr('colspan', 3) | :attr('colspan', 3) | ||
:attr('rowspan', 2) | :attr('rowspan', 2) | ||
header0 :tag('th'):wikitext(cookIcon .. '<br>Level') | |||
:attr('rowspan', 2) | :attr('rowspan', 2) | ||
header0 :tag('th'):wikitext('[[DLC]]') | |||
:attr('rowspan', 2) | :attr('rowspan', 2) | ||
if includeTime == true then | |||
header0 :tag('th'):wikitext('Cook<br>Time (s)') | |||
:attr('rowspan', 2) | |||
end | |||
header0 :tag('th'):wikitext(cookIcon .. '<br>XP') | |||
:attr('rowspan', 2) | :attr('rowspan', 2) | ||
header0 :tag('th'):wikitext('XP/s') | |||
:attr('rowspan', 2) | :attr('rowspan', 2) | ||
header0 :tag('th'):wikitext('Total Healing') | |||
:attr('colspan', 2) | :attr('colspan', 2) | ||
header0 :tag('th'):wikitext('Ingredients') | |||
:attr('rowspan', 2) | :attr('rowspan', 2) | ||
Line 108: | Line 112: | ||
:css('text-align', 'center') | :css('text-align', 'center') | ||
:attr('data-sort-value', Icons.getExpansionID(item.id)) | :attr('data-sort-value', Icons.getExpansionID(item.id)) | ||
row:tag('td'):wikitext(Num.round(baseInt, 2, 0)) | if includeTime == true then | ||
row:tag('td'):wikitext(Num.round(baseInt, 2, 0)) | |||
:css('text-align', 'right') | |||
:attr('data-sort-value', baseInt) | |||
end | |||
row:tag('td'):wikitext(Num.formatnum(baseXP)) | row:tag('td'):wikitext(Num.formatnum(baseXP)) | ||
:css('text-align', 'right') | :css('text-align', 'right') | ||
:attr('data-sort-value', baseXP) | :attr('data-sort-value', baseXP) | ||
row:tag('td'):wikitext(Num.formatnum(Num.round(xpRate, | row:tag('td'):wikitext(Num.formatnum(Num.round(xpRate, 0, 0))) | ||
:css('text-align', 'right') | :css('text-align', 'right') | ||
:attr('data-sort-value', xpRate) | :attr('data-sort-value', xpRate) |
edits