Fix founding cities removing city center tile improvement (#10584)

* Fix founding cities removing city center tile improvement

* Simplify since we know the tile
This commit is contained in:
SeventhM 2023-11-25 22:08:14 -08:00 committed by GitHub
parent 5396c41efc
commit 17a7465ba3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,8 +14,6 @@ import com.unciv.models.ruleset.unique.UniqueType
class CityFounder {
fun foundCity(civInfo: Civilization, cityLocation: Vector2): City {
if (civInfo.gameInfo.ruleset.tileImprovements.containsKey(Constants.cityCenter))
civInfo.gameInfo.tileMap[cityLocation].changeImprovement(Constants.cityCenter)
val city = City()
city.foundingCiv = civInfo.civName
@ -56,7 +54,8 @@ class CityFounder {
})
tile.removeTerrainFeature(terrainFeature)
tile.removeImprovement()
if (civInfo.gameInfo.ruleset.tileImprovements.containsKey(Constants.cityCenter))
tile.changeImprovement(Constants.cityCenter, civInfo)
tile.improvementInProgress = null
val ruleset = civInfo.gameInfo.ruleset