mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-05 15:59:50 +07:00
getLastTerrain simple patch (#4971)
This commit is contained in:
@ -135,7 +135,8 @@ open class TileInfo {
|
||||
fun getCity(): CityInfo? = owningCity
|
||||
|
||||
fun getLastTerrain(): Terrain = when {
|
||||
terrainFeatures.isNotEmpty() -> getTerrainFeatures().last()
|
||||
terrainFeatures.isNotEmpty() -> ruleset.terrains[terrainFeatures.last()]
|
||||
?: getBaseTerrain() // defense against rare edge cases involving baseTerrain Hill deprecation
|
||||
naturalWonder != null -> getNaturalWonder()
|
||||
else -> getBaseTerrain()
|
||||
}
|
||||
|
Reference in New Issue
Block a user