572
edits
No edit summary |
No edit summary |
||
Line 408: | Line 408: | ||
local biomename = GameData.getEntityByID(Township.biomes, biomeid).name | local biomename = GameData.getEntityByID(Township.biomes, biomeid).name | ||
-- Optional hidden bonus/penalty for building | -- Optional hidden bonus/penalty for building | ||
local modifier = GameData.getEntityByProperty(building.biomeModifiers, 'biomeID', biomeid) | local modifier = nil | ||
if #building.biomeModifiers > 0 then | |||
modifier = GameData.getEntityByProperty(building.biomeModifiers, 'biomeID', biomeid) | |||
end | |||
if modifier ~= nil then | if modifier ~= nil then | ||
local color = modifier.value < 0 and 'red' or 'green' | local color = modifier.value < 0 and 'red' or 'green' |
edits