Fixed bug where cities would not "recognize" tiles on the first turn - for realz this time

This commit is contained in:
Yair Morgenstern 2018-05-06 11:24:39 +03:00
parent c6e344b16e
commit 5d4003ecbf
3 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ class CityInfo {
fun getCenterTile(): TileInfo = tileMap[location]
fun getTiles(): List<TileInfo> = tiles.map { tileMap[it] }
fun getTilesInRange(): List<TileInfo> = getCenterTile().getTilesInDistance( 3).filter { civInfo == it.getOwner() }
fun getTilesInRange(): List<TileInfo> = getCenterTile().getTilesInDistance( 3)
// Remove resources required by buildings
@ -92,6 +92,7 @@ class CityInfo {
}
expansion.reset()
civInfo.gameInfo.updateTilesToCities()
val tile = getCenterTile()
tile.roadStatus = RoadStatus.Railroad

View File

@ -62,7 +62,6 @@ class UnitActions {
unit.civInfo.addCity(tile.position)
unitTable.currentlyExecutingAction = null // In case the settler was in the middle of doing something and we then founded a city with it
tile.unit = null // Remove settler!
unit.civInfo.gameInfo.updateTilesToCities()
},
unit.currentMovement != 0f &&
!tile.getTilesInDistance(2).any { it.isCityCenter() })