Resolved #12104 - "Land to water" natural wonders do not cause ruins on water tiles

This commit is contained in:
yairm210 2024-08-11 12:34:08 +03:00
parent 6e57a02f8f
commit dc7f0434a4

View File

@ -178,9 +178,10 @@ class NaturalWonderGenerator(val ruleset: Ruleset, val randomness: MapGeneration
companion object {
fun placeNaturalWonder(wonder: Terrain, location: Tile) {
location.naturalWonder = wonder.name
if (wonder.turnsInto != null) {
val turnsIntoObject = location.ruleset.terrains[wonder.turnsInto]
if (turnsIntoObject != null) {
clearTile(location)
location.baseTerrain = wonder.turnsInto!!
location.setBaseTerrain(turnsIntoObject)
} else {
clearTile(location, wonder.occursOn)
}
@ -205,7 +206,7 @@ class NaturalWonderGenerator(val ruleset: Ruleset, val randomness: MapGeneration
removeLakesNextToFutureCoast(location, tile)
if (terrainObject.type.isBaseTerrain) {
clearTile(tile)
tile.baseTerrain = convertTo
tile.setBaseTerrain(terrainObject)
}
if (terrainObject.type == TerrainType.TerrainFeature) {
clearTile(tile, tile.terrainFeatures)