572
edits
No edit summary |
No edit summary |
||
Line 339: | Line 339: | ||
-- Icon | -- Icon | ||
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|style="text-align:center"|'..Icons.Icon({building.name, type='building', size='250', notext=true})) | ||
-- Description | -- Description - disabled because all buildings have the same description "A basic house" | ||
table.insert(ret, '\r\n|-\r\n|style="text-align:center"|'..building.description) | -- table.insert(ret, '\r\n|-\r\n|style="text-align:center"|'..building.description) | ||
-- ID | -- ID | ||
table.insert(ret, '\r\n|-\r\n| <b>Building ID:</b> '..building.id) | table.insert(ret, '\r\n|-\r\n| <b>Building ID:</b> '..building.id) | ||
-- Type | -- Type | ||
table.insert(ret, '\r\n|-\r\n| <b>Type:</b> '..building.type) | table.insert(ret, '\r\n|-\r\n| <b>Type:</b> '..building.type) | ||
-- Tier | |||
local tier = p._GetTierRequirements(building.tier) | |||
table.insert(ret, '\r\n|-\r\n| <b>Tier '..building.tier..'</b><ul><li>'..Icons._SkillReq('Township', tier.level, false)..'</li><li>'..p.GetTownshipStatIcon('Population')..tier.population..'</li></ul>') | |||
-- Cost | -- Cost | ||
local cost = {} | local cost = {} | ||
Line 351: | Line 354: | ||
end | end | ||
table.insert(ret, '\r\n|-\r\n| <b>Base Cost:</b> '..table.concat(cost, ', ')) | table.insert(ret, '\r\n|-\r\n| <b>Base Cost:</b> '..table.concat(cost, ', ')) | ||
-- | -- Fixed benefits | ||
local | local benefits = {} | ||
table.insert( | if building.provides.population then | ||
table.insert(benefits, p.GetTownshipStatIcon('Population')..building.provides.population) | |||
end | |||
if building.provides.happiness then | |||
table.insert(benefits, p.GetTownshipStatIcon('Happiness')..building.provides.happiness) | |||
end | |||
if building.provides.education then | |||
table.insert(benefits, p.GetTownshipStatIcon('Education')..building.provides.education) | |||
end | |||
if building.provides.storage then | |||
table.insert(benefits, p.GetTownshipStatIcon('Storage')..building.provides.storage) | |||
end | |||
if building.provides.deadStorage then | |||
table.insert(benefits, p.GetTownshipStatIcon('Dead Storage')..building.provides.deadStorage) | |||
end | |||
if #benefits > 0 then | |||
table.insert(ret, '\r\n|-\r\n| <b>Provides:</b> '..table.concat(cost, ', ')) | |||
end | |||
-- End | |||
table.insert(ret, '\r\n|}') | table.insert(ret, '\r\n|}') | ||
return table.concat(ret) | return table.concat(ret) | ||
Line 368: | Line 390: | ||
Education = false, | Education = false, | ||
Health = false, | Health = false, | ||
Worship = false | Worship = false, | ||
["Dead Storage"] = false, | |||
} | } | ||
local class = changing_color[stat] and ' class="township-colortoggle"' or '' | local class = changing_color[stat] and ' class="township-colortoggle"' or '' |
edits