mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-16 10:49:17 +07:00
Resolved #2536 - cities correctly expand to the last available tile
This commit is contained in:
@ -26,7 +26,6 @@ class CityExpansionManager {
|
||||
.map { it.position }
|
||||
return cityInfo.tiles.count { it != cityInfo.location && it !in tilesAroundCity}
|
||||
}
|
||||
fun isAreaMaxed(): Boolean = cityInfo.tiles.size >= 90
|
||||
|
||||
// This one has conflicting sources -
|
||||
// http://civilization.wikia.com/wiki/Mathematics_of_Civilization_V says it's 20+(10(t-1))^1.1
|
||||
@ -98,10 +97,6 @@ class CityExpansionManager {
|
||||
}
|
||||
|
||||
private fun addNewTileWithCulture(): Boolean {
|
||||
if (isAreaMaxed()) {
|
||||
cultureStored = 0
|
||||
return false
|
||||
}
|
||||
val chosenTile = chooseNewTileToOwn()
|
||||
if (chosenTile != null) {
|
||||
cultureStored -= getCultureToNextTile()
|
||||
|
@ -60,7 +60,7 @@ class CityStatsTable(val cityScreen: CityScreen): Table() {
|
||||
} else {
|
||||
"Stopped expansion".tr()
|
||||
}
|
||||
if (!cityInfo.expansion.isAreaMaxed())
|
||||
if (cityInfo.expansion.chooseNewTileToOwn()!=null)
|
||||
turnsToExpansionString += " (" + cityInfo.expansion.cultureStored + "/" +
|
||||
cityInfo.expansion.getCultureToNextTile() + ")"
|
||||
|
||||
|
@ -116,7 +116,7 @@ class TileEditorOptionsTable(val mapEditorScreen: MapEditorScreen): Table(Camera
|
||||
val tile = tileGroup.tileInfo
|
||||
if (tile.improvement == improvementName && tile != it)
|
||||
tile.improvement = null
|
||||
tile.setTransients()
|
||||
tile.setTerrainTransients()
|
||||
tileGroup.update()
|
||||
}
|
||||
}
|
||||
@ -249,7 +249,7 @@ class TileEditorOptionsTable(val mapEditorScreen: MapEditorScreen): Table(Camera
|
||||
} else tileInfo.baseTerrain = terrain
|
||||
|
||||
tileInfo.resource = resource.name
|
||||
tileInfo.setTransients()
|
||||
tileInfo.setTerrainTransients()
|
||||
|
||||
setCurrentHex(tileInfo, resource.name.tr() + "\n" + resource.clone().toString())
|
||||
}
|
||||
@ -332,7 +332,7 @@ class TileEditorOptionsTable(val mapEditorScreen: MapEditorScreen): Table(Camera
|
||||
}
|
||||
|
||||
private fun makeTileGroup(tileInfo: TileInfo): TileGroup {
|
||||
tileInfo.setTransients()
|
||||
tileInfo.setTerrainTransients()
|
||||
val group = TileGroup(tileInfo, TileSetStrings())
|
||||
group.showEntireMap = true
|
||||
group.forMapEditorIcon = true
|
||||
|
Reference in New Issue
Block a user