mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-20 19:56:51 +01:00
Hills are converted to terrains that surround them
This commit is contained in:
parent
b35d5d3121
commit
fb93e3f7ee
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 877 KiB After Width: | Height: | Size: 888 KiB |
|
|
@ -661,8 +661,10 @@ open class TileInfo {
|
|||
|
||||
private fun convertHillToTerrainFeature(){
|
||||
if (baseTerrain == Constants.hill &&
|
||||
ruleset.terrains[Constants.hill]?.type == TerrainType.TerrainFeature){
|
||||
baseTerrain = Constants.grassland
|
||||
ruleset.terrains[Constants.hill]?.type == TerrainType.TerrainFeature) {
|
||||
val mostCommonBaseTerrain = neighbors.filter { it.isLand && !it.isImpassible() }
|
||||
.groupBy { it.baseTerrain }.maxByOrNull { it.value.size }
|
||||
baseTerrain = mostCommonBaseTerrain?.key ?: Constants.grassland
|
||||
//We have to add hill as first terrain feature
|
||||
val copy = terrainFeatures.toTypedArray()
|
||||
terrainFeatures.clear()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user