2,875
edits
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
end | end | ||
return Icons.Icon({itemName, type='item', qty = amount, notext=true}) | |||
end | end | ||
Line 137: | Line 137: | ||
local div = html:tag('div') | local div = html:tag('div') | ||
if includeObstacles then | |||
div:tag('b'):wikitext('Obstacles') | |||
local tbl = mw.html.create("table") | |||
:addClass("wikitable sticky-header text-align-left") | |||
tbl :tag("tr") | |||
:tag("th"):wikitext("Slot") | |||
:tag("th"):wikitext("Obstacle") | |||
for _, v in pairs(courseRequirements.Obstacles) do | |||
tab :tag('tr') | |||
:tag('td') | |||
:addClass('text-align-right') | |||
:wikitext(v.Slot) | |||
:tag('td') | |||
:wikitext(Icons.Icon({v.Name, type='agility'})) | |||
end | |||
div:node(tbl) | |||
end | |||
if includeItems then | if includeItems then | ||
div:tag(' | div:tag('b'):wikitext('Items Required') | ||
local ul = div:tag('ul') | local ul = div:tag('ul') | ||
Line 150: | Line 171: | ||
end | end | ||
div:tag(' | if includeSkills then | ||
div:tag('b'):wikitext('Skills Required') | |||
local ul2 = div:tag('ul') | |||
local skillList = Shared.sortDictionary(courseRequirements.CourseLevelRequirements, | |||
function(a, b) return a.skill < b.skill end, | |||
function(a, b) return {skill = a, level = b} end) | |||
for _, v in pairs(skillList) do | |||
ul2:tag('li'):wikitext(Icons._SkillReq(v.skill, v.level)) | |||
end | |||
end | |||
return tostring(html) | return tostring(html) | ||
end | end |
edits