572
edits
No edit summary |
No edit summary |
||
Line 506: | Line 506: | ||
-- Gets text for only the biomes that have a modifier for a building | -- Gets text for only the biomes that have a modifier for a building | ||
function p._GetBiomeModifiers(building) | function p._GetBiomeModifiers(building) | ||
local biomeRet = {} | local biomeRet = {} | ||
for _, biome in ipairs(building.biomeModifiers) do | for _, biome in ipairs(building.biomeModifiers) do | ||
local biomename = GameData.getEntityByID(Township.biomes, biome.biomeID).name | local biomename = GameData.getEntityByID(Township.biomes, biome.biomeID).name | ||
Line 518: | Line 513: | ||
table.insert(biomeRet, '<li style="color:'..color..'">'..biomename..' ('..biome_value..'%)</li>') | table.insert(biomeRet, '<li style="color:'..color..'">'..biomename..' ('..biome_value..'%)</li>') | ||
end | end | ||
table. | if #biomeRet == 0 then | ||
return nil | |||
end | |||
return table.concat('<ul>'..biomeRet..'</ul>') | |||
end | end | ||
edits