Module:Township/Sandbox: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 344: Line 344:
header:tag('th')
header:tag('th')
:wikitext('Building')
:wikitext('Building')
level:tag('td')
level:tag('th')
:wikitext(Icons.Icon({'Township', 'Level', type='skill', nolink=true}))
:wikitext(Icons.Icon({'Township', 'Level', type='skill', nolink=true}))
pop:tag('td')
pop:tag('th')
:wikitext(Icons.Icon({'Township', 'Population', img='Population', type='township', section='Population' }))
:wikitext(Icons.Icon({'Township', 'Population', img='Population', type='township', section='Population' }))
Line 375: Line 375:
end
end


tbl:tag('tr'):tag('td')
local trow = tbl:tag('tr')
trow:tag('td')
:css('text-align', 'left')
:css('text-align', 'left')
:attr('data-sort-value', building.name)
:attr('data-sort-value', building.name)
Line 382: Line 383:
for _, biome in ipairs(Township.biomes) do
for _, biome in ipairs(Township.biomes) do
if buildingBiomes[biome.id] then
if buildingBiomes[biome.id] then
tbl :tag('td')
trow:tag('td')
:addClass('table-positive')
:addClass('table-positive')
:wikitext('✓')
:wikitext('✓')
else
else
tbl :tag('td')
trow:tag('td')
:css('border', '0px')
:css('border', '0px')
end
end
2,875

edits