Anonymous

Module:Sandbox/GauTest/Township: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 320: Line 320:


-- Gets the Township level and population requirements for a tier
-- Gets the Township level and population requirements for a tier
-- Returns {population=X, level=X}
function p._GetTierRequirements(tier)
function p._GetTierRequirements(tier)
return Township.populationForTier[tier]
return Township.populationForTier[tier]
Line 332: Line 333:
local ret = {}
local ret = {}
table.insert(ret, 'ABC')
table.insert(ret, 'ABC')
table.insert(ret, '\r\n{| class="wikitable infobox"\r\n|-\r\n! hi TESTTESTTEST \r\n|}')
table.insert(ret, '\r\n{| class="wikitable infobox"')
table.insert(ret, '\r\n|-\r\n!'..building.name)
table.insert(ret, '\r\n|-\r\n|style="text-align:center"|'..Icons.Icon({building.name, type='building', size='250', notext=true}))
table.insert(ret, '\r\n|-\r\n| <b>Building ID:</b> '..building.id)
local tier = p._GetTierRequirements(building.tier)
table.insert(ret, '\r\n|-\r\n| <b>Tier:</b> '..building.tier..'('..Icons._SkillReq('Township', tier.level, false)..'POP'..tier.population..')')
table.insert(ret, '\r\n|-\r\n| <b>Building ID:</b> '..building.id)
table.insert(ret, '\r\n|}')
return table.concat(ret)
return table.concat(ret)
end
end
572

edits