Resolved #5867 - fixed rare 'uninitialized continent sizes' bug

This commit is contained in:
yairm210
2021-12-28 21:28:31 +02:00
parent f6d186445c
commit e3fb00d939

View File

@ -156,7 +156,8 @@ object Automation {
// If we have vision of our entire starting continent (ish) we are not afraid // If we have vision of our entire starting continent (ish) we are not afraid
civInfo.gameInfo.tileMap.assignContinents(TileMap.AssignContinentsMode.Ensure) civInfo.gameInfo.tileMap.assignContinents(TileMap.AssignContinentsMode.Ensure)
val startingContinent = civInfo.getCapital().getCenterTile().getContinent() val startingContinent = civInfo.getCapital().getCenterTile().getContinent()
if (civInfo.gameInfo.tileMap.continentSizes[startingContinent]!! < civInfo.viewableTiles.count() * multiplier) val startingContinentSize = civInfo.gameInfo.tileMap.continentSizes[startingContinent]
if (startingContinentSize != null && startingContinentSize < civInfo.viewableTiles.count() * multiplier)
return false return false
// Otherwise we're afraid // Otherwise we're afraid