Module:Township/Sandbox: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 338: Line 338:
:css('text-align', 'center')
:css('text-align', 'center')


local header = mw.html.create('tr')
local header = mw.html.create('tr'):addClass('headerRow-0')
:addClass('headerRow-0')
local level = mw.html.create('tr'):addClass('sorttop')
local pop = mw.html.create('tr'):addClass('sorttop')
 
header:tag('th')
:wikitext('Building')
:wikitext('Building')
local level = mw.html.create('tr')
level:tag('td')
:addClass('sorttop')
:wikitext(Icons.Icon({'Township', 'Level', type='skill', nolink=true}))
:wikitext(Icons.Icon({'Township', 'Level', type='skill', nolink=true}))
local pop = mw.html.create('tr')
pop:tag('td')
:addClass('sorttop')
:wikitext(Icons.Icon({'Township', 'Population', img='Population', type='township', section='Population' }))
:wikitext(Icons.Icon({'Township', 'Population', img='Population', type='township', section='Population' }))
 
for _, biome in ipairs(Township.biomes) do
for _, biome in ipairs(Township.biomes) do
local reqs = p._getTierRequirements(biome.tier)
local reqs = p._getTierRequirements(biome.tier)
Line 359: Line 360:
tbl:node(header)
tbl:node(header)
tbl:node(level)
-- tbl:node(level)
tbl:node(pop)
--tbl:node(pop)


for _, _building in ipairs(p._sortedBuildings(false)) do
for _, _building in ipairs(p._sortedBuildings(false)) do
2,875

edits