From 750ca0c1e9e82ec77fd888208fb856cc393ad65e Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 29 Oct 2019 22:32:52 +0200 Subject: [PATCH] Resolved #1252 - Tiles created inside your borders take control of the city center tile, so they don't become "Invisible cities" --- core/src/com/unciv/logic/city/CityExpansionManager.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/city/CityExpansionManager.kt b/core/src/com/unciv/logic/city/CityExpansionManager.kt index 238de21420..3b4610fd69 100644 --- a/core/src/com/unciv/logic/city/CityExpansionManager.kt +++ b/core/src/com/unciv/logic/city/CityExpansionManager.kt @@ -72,12 +72,17 @@ class CityExpansionManager { //region state-changing functions fun reset() { - for(tile in cityInfo.tiles.map { cityInfo.tileMap[it] }) + for(tile in cityInfo.getTiles()) relinquishOwnership(tile) cityInfo.getCenterTile().getTilesInDistance(1) - .filter { it.getCity()==null } // can't take ownership of owned tiles + .filter { it.getCity()==null } // can't take ownership of owned tiles (by other cities) .forEach { takeOwnership(it) } + + // The only way to create a city inside an owned tile is if it's in your territory + // In this case, if you don't assign control of the central tile to the city, + // It becomes an invisible city and weird shit starts happening + takeOwnership(cityInfo.getCenterTile()) } private fun addNewTileWithCulture() {