2,875
edits
(Update for v1.3) |
(Add expansion icon as dlc column to pet table) |
||
Line 163: | Line 163: | ||
end | end | ||
local | local html = mw.html.create('table') | ||
:addClass('wikitable') | |||
html:tag('tr') | |||
:tag('th'):wikitext('Pet') | |||
:tag('th'):wikitext('Name') | |||
:tag('th'):wikitext('[[DLC]]') | |||
:tag('th'):wikitext('Effect') | |||
for i, pet in ipairs(pets) do | for i, pet in ipairs(pets) do | ||
html:tag('tr') | |||
:tag('td'):wikitext(Icons.Icon({pet.name, type='pet', notext=true})) | |||
:css('text-align', 'center') | |||
:tag('td'):wikitext('[[' .. pet.name .. ']]') | |||
:tag('td'):wikitext(Icons.getExpansionIcon(pet.id)) | |||
:tag('td'):wikitext(p._getPetEffect(pet)) | |||
end | end | ||
return tostring(html) | |||
return | |||
end | end | ||
Line 182: | Line 189: | ||
if skillID == nil then | if skillID == nil then | ||
error("SkillID not found for skill: " .. skillName) | |||
else | else | ||
local pets = p.getPets(function(pet) return p._getPetSkill(pet) == skillID end) | local pets = p.getPets(function(pet) return p._getPetSkill(pet) == skillID end) |
edits