Anonymous

Module:Sandbox/GauTest/Township: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 356: Line 356:
-- Fixed benefits
-- Fixed benefits
local benefits = {}
local benefits = {}
if building.provides.population then
local stats = {
table.insert(benefits, p.GetTownshipStatIcon('Population')..building.provides.population)
population = 'Population',
end
happiness = 'Happiness',
if building.provides.happiness then
education = 'Education',
table.insert(benefits, p.GetTownshipStatIcon('Happiness')..building.provides.happiness)
storage = 'Storage',
end
deadStorage = 'Dead Storage'
if building.provides.education then
}
table.insert(benefits, p.GetTownshipStatIcon('Education')..building.provides.education)
for key, name in pairs(stats) do
end
if building.provides[key] ~= nil and building.provides[key] ~= 0 then
if building.provides.storage then
table.insert(benefits, p.GetTownshipStatIcon(name)..building.provides[key])
table.insert(benefits, p.GetTownshipStatIcon('Storage')..building.provides.storage)
end
end
if building.provides.deadStorage then
table.insert(benefits, p.GetTownshipStatIcon('Dead Storage')..building.provides.deadStorage)
end
end
if #benefits > 0 then
if #benefits > 0 then
572

edits