mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-21 21:30:20 +07:00
Continents shape improved.
This commit is contained in:
@ -13,8 +13,8 @@ import kotlin.math.*
|
|||||||
enum class MapType {
|
enum class MapType {
|
||||||
Perlin,
|
Perlin,
|
||||||
Default,
|
Default,
|
||||||
Pangaea,
|
|
||||||
Continents,
|
Continents,
|
||||||
|
Pangaea,
|
||||||
File
|
File
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ class CelluarAutomataRandomMapGenerator(): SeedRandomMapGenerator() {
|
|||||||
|
|
||||||
constructor(type: MapType): this() {
|
constructor(type: MapType): this() {
|
||||||
mapType = type
|
mapType = type
|
||||||
if (mapType != MapType.Default && mapType !=MapType.Pangaea) {
|
if (mapType != MapType.Default && mapType !=MapType.Pangaea && mapType !=MapType.Continents) {
|
||||||
mapType = MapType.Default
|
mapType = MapType.Default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -59,9 +59,8 @@ class CelluarAutomataRandomMapGenerator(): SeedRandomMapGenerator() {
|
|||||||
}
|
}
|
||||||
if (mapType == MapType.Continents) { //keep a ocean column in the middle
|
if (mapType == MapType.Continents) { //keep a ocean column in the middle
|
||||||
for (y in -distance..distance) {
|
for (y in -distance..distance) {
|
||||||
landscape[Vector2(0f, y.toFloat())] = TerrainType.Water
|
landscape[Vector2((y/2).toFloat(), y.toFloat())] = TerrainType.Water
|
||||||
landscape[Vector2(1f, y.toFloat())] = TerrainType.Water
|
landscape[Vector2((y/2+1).toFloat(), y.toFloat())] = TerrainType.Water
|
||||||
landscape[Vector2(-1f, y.toFloat())] = TerrainType.Water
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user