mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 17:59:11 +07:00
Resolved #12104 - "Land to water" natural wonders do not cause ruins on water tiles
This commit is contained in:
@ -178,9 +178,10 @@ class NaturalWonderGenerator(val ruleset: Ruleset, val randomness: MapGeneration
|
|||||||
companion object {
|
companion object {
|
||||||
fun placeNaturalWonder(wonder: Terrain, location: Tile) {
|
fun placeNaturalWonder(wonder: Terrain, location: Tile) {
|
||||||
location.naturalWonder = wonder.name
|
location.naturalWonder = wonder.name
|
||||||
if (wonder.turnsInto != null) {
|
val turnsIntoObject = location.ruleset.terrains[wonder.turnsInto]
|
||||||
|
if (turnsIntoObject != null) {
|
||||||
clearTile(location)
|
clearTile(location)
|
||||||
location.baseTerrain = wonder.turnsInto!!
|
location.setBaseTerrain(turnsIntoObject)
|
||||||
} else {
|
} else {
|
||||||
clearTile(location, wonder.occursOn)
|
clearTile(location, wonder.occursOn)
|
||||||
}
|
}
|
||||||
@ -205,7 +206,7 @@ class NaturalWonderGenerator(val ruleset: Ruleset, val randomness: MapGeneration
|
|||||||
removeLakesNextToFutureCoast(location, tile)
|
removeLakesNextToFutureCoast(location, tile)
|
||||||
if (terrainObject.type.isBaseTerrain) {
|
if (terrainObject.type.isBaseTerrain) {
|
||||||
clearTile(tile)
|
clearTile(tile)
|
||||||
tile.baseTerrain = convertTo
|
tile.setBaseTerrain(terrainObject)
|
||||||
}
|
}
|
||||||
if (terrainObject.type == TerrainType.TerrainFeature) {
|
if (terrainObject.type == TerrainType.TerrainFeature) {
|
||||||
clearTile(tile, tile.terrainFeatures)
|
clearTile(tile, tile.terrainFeatures)
|
||||||
|
Reference in New Issue
Block a user