mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 18:28:42 +07:00
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:
@ -14,8 +14,6 @@ import com.unciv.models.ruleset.unique.UniqueType
|
|||||||
|
|
||||||
class CityFounder {
|
class CityFounder {
|
||||||
fun foundCity(civInfo: Civilization, cityLocation: Vector2): City {
|
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()
|
val city = City()
|
||||||
|
|
||||||
city.foundingCiv = civInfo.civName
|
city.foundingCiv = civInfo.civName
|
||||||
@ -56,7 +54,8 @@ class CityFounder {
|
|||||||
})
|
})
|
||||||
tile.removeTerrainFeature(terrainFeature)
|
tile.removeTerrainFeature(terrainFeature)
|
||||||
|
|
||||||
tile.removeImprovement()
|
if (civInfo.gameInfo.ruleset.tileImprovements.containsKey(Constants.cityCenter))
|
||||||
|
tile.changeImprovement(Constants.cityCenter, civInfo)
|
||||||
tile.improvementInProgress = null
|
tile.improvementInProgress = null
|
||||||
|
|
||||||
val ruleset = civInfo.gameInfo.ruleset
|
val ruleset = civInfo.gameInfo.ruleset
|
||||||
|
Reference in New Issue
Block a user