2,875
edits
No edit summary |
No edit summary |
||
Line 232: | Line 232: | ||
return result | return result | ||
end | end | ||
local mw = require('mw') | |||
local p = {} | |||
function p.getPetPageTable() | function p.getPetPageTable() | ||
local html = mw.html.create('table') | |||
:addClass('wikitable sortable lighttable stickyHeader') | |||
html:tag('tr'):addClass('headerRow-0') | |||
:tag('th'):attr('colspan', '2') | |||
:wikitext('Pet') | |||
:tag('th'):wikitext('Acquired From') | |||
:tag('th'):wikitext('Effect') | |||
for i, thisPet in ipairs(GameData.rawData.pets) do | |||
html:tag('tr') | |||
:tag('td'):addClass('table-img') | |||
:attr('data-sort-value', thisPet.name) | |||
:wikitext(Icons.Icon({thisPet.name, size='60', type='pet', notext=true})) | |||
:tag('td'):wikitext(Icons.getExpansionIcon(thisPet.id) .. Icons.Icon({thisPet.name, type='pet', noicon=true})) | |||
:tag('td'):wikitext(p._getPetSourceText(thisPet)) | |||
:tag('td'):wikitext(p._getPetEffect(thisPet)) | |||
end | |||
return tostring(html) | |||
end | end | ||
edits