mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-08 23:08:35 +07:00
Resolved #5867 - fixed rare 'uninitialized continent sizes' bug
This commit is contained in:
@ -143,7 +143,7 @@ object Automation {
|
|||||||
return false
|
return false
|
||||||
|
|
||||||
var multiplier = if (civInfo.gameInfo.gameParameters.ragingBarbarians) 1.3f
|
var multiplier = if (civInfo.gameInfo.gameParameters.ragingBarbarians) 1.3f
|
||||||
else 1f // We're slightly more afraid of raging barbs
|
else 1f // We're slightly more afraid of raging barbs
|
||||||
|
|
||||||
// Past the early game we are less afraid
|
// Past the early game we are less afraid
|
||||||
if (civInfo.gameInfo.turns > 120 * civInfo.gameInfo.gameParameters.gameSpeed.modifier * multiplier)
|
if (civInfo.gameInfo.turns > 120 * civInfo.gameInfo.gameParameters.gameSpeed.modifier * multiplier)
|
||||||
@ -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
|
||||||
|
Reference in New Issue
Block a user