2,875
edits
(Update for v1.3) |
No edit summary |
||
Line 35: | Line 35: | ||
local skillID = 'Woodcutting' | local skillID = 'Woodcutting' | ||
local | local html = mw.html.create('table') | ||
:addClass('wikitable sortable stickyHeader') | |||
html:tag('tr') | |||
:addClass("headerRow-0") | |||
:tag('th'):attr('colspan', 2) | |||
:wikitext('Tree') | |||
:tag('th'):attr('colspan', 2) | |||
:wikitext('Logs') | |||
:tag('th'):wikitext('Requirements') | |||
:tag('th'):wikitext('[[DLC]]') | |||
:tag('th'):wikitext('XP') | |||
:tag('th'):wikitext('Cut Time') | |||
:tag('th'):wikitext('XP/s') | |||
:tag('th'):wikitext('Price/s') | |||
local trees = GameData.getEntities(SkillData.Woodcutting.trees, | local trees = GameData.getEntities(SkillData.Woodcutting.trees, | ||
Line 46: | Line 56: | ||
end | end | ||
) | ) | ||
table.sort(trees, function(a, b) return Skills.standardRecipeSort(skillID, a, b) end) | table.sort(trees, function(a, b) return Skills.standardRecipeSort(skillID, a, b) end) | ||
for i, tree in ipairs(trees) do | for i, tree in ipairs(trees) do | ||
Line 57: | Line 68: | ||
local currSec = Shared.round(log.sellsFor / (baseInt / 1000), 2, 2) | local currSec = Shared.round(log.sellsFor / (baseInt / 1000), 2, 2) | ||
html:tag('tr') | |||
:tag('td'):wikitext(Icons.Icon({log.name, img=tree.name, type='tree', notext=true})) | |||
:addClass('table-img') | |||
:attr('data-sort-value', tree.name) | |||
:tag('td'):wikitext(tree.name) | |||
:tag('td'):wikitext(Icons.Icon({log.name, type='item', notext=true})) | |||
:addClass('table-img') | |||
:attr('data-sort-value', log.name) | |||
:tag('td'):wikitext('[[' .. log.name .. ']]') | |||
:tag('td'):wikitext(reqText) | |||
:attr('data-sort-value', level) | |||
:tag('td'):wikitext(Icons.getExpansionIcon(tree.id)) | |||
:css('text-align', 'center') | |||
:tag('td'):wikitext(Shared.formatnum(baseXP)) | |||
:css('text-align', 'right') | |||
:tag('td'):wikitext(Shared.timeString(baseInt / 1000, true)) | |||
:attr('data-sort-value', baseInt) | |||
:css('text-align', 'right') | |||
:tag('td'):wikitext(Shared.round(XPSec, 2, 2)) | |||
:css('text-align', 'right') | |||
:tag('td'):wikitext(Icons._Currency(sellCurrency, currSec)) | |||
:attr('data-sort-value', currSec) | |||
:css('text-align', 'right') | |||
end | end | ||
return tostring(html) | |||
return | |||
end | end | ||
edits