572
edits
No edit summary |
No edit summary |
||
Line 463: | Line 463: | ||
end | end | ||
-- Special | -- Special for Township buildings | ||
if townshipBuildingName ~= nil then | if townshipBuildingName ~= nil then | ||
local building = Township._GetBuildingByName(townshipBuildingName) | local building = Shared.clone(Township._GetBuildingByName(townshipBuildingName)) | ||
-- biomeModifiers | |||
for _, biome in ipairs(building.biomeModifiers) do | for _, biome in ipairs(building.biomeModifiers) do | ||
local biomename = GameData.getEntityByID(GameData.skillData.Township.biomes, biome.biomeID).name | local biomename = GameData.getEntityByID(GameData.skillData.Township.biomes, biome.biomeID).name | ||
Line 474: | Line 475: | ||
row.val = biome.value | row.val = biome.value | ||
local color = biome.value < 0 and 'red' or 'green' | local color = biome.value < 0 and 'red' or 'green' | ||
row.modifierText = '<span style="color:'..color..'">'..Shared.numStrWithSign(biome.value)..'% Production for | row.modifierText = '<span style="color:'..color..'">'..Shared.numStrWithSign(biome.value)..'% Production for '..townshipBuildingName..'</span>' | ||
row.otherModifiers = '' | row.otherModifiers = '' | ||
table.insert(tableArray, row) | |||
end | |||
-- Education | |||
if #building.provides.resources > 0 then | |||
row.icon = Icons.Icon({'Education', type='township'}) | |||
row.type = 'Township' | |||
row.val = 100 | |||
row.modifierText, row.otherModifiers = getModText({increasedTownshipResourceProduction = 100}) | |||
table.insert(tableArray, row) | table.insert(tableArray, row) | ||
end | end |
edits