mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 03:53:12 -04:00
Change Default Map Generation to Perlin (#7856)
* Changes * Slight adjustment to MainMenuScreen * Make default waterThreshold for Default to be -0.05 * blip * blip * Rename cellular automata to Smoothed Random
This commit is contained in:
parent
984e91a73e
commit
c39aca7a31
@ -350,7 +350,7 @@ Custom =
|
|||||||
Map Generation Type =
|
Map Generation Type =
|
||||||
Default =
|
Default =
|
||||||
Pangaea =
|
Pangaea =
|
||||||
Perlin =
|
Smoothed Random =
|
||||||
Continents =
|
Continents =
|
||||||
Four Corners =
|
Four Corners =
|
||||||
Archipelago =
|
Archipelago =
|
||||||
|
@ -118,7 +118,7 @@ class MainMenuScreen: BaseScreen(), RecreateOnResize {
|
|||||||
shape = MapShape.rectangular
|
shape = MapShape.rectangular
|
||||||
mapSize = MapSizeNew(mapWidth.toInt() + 1, mapHeight.toInt() + 1)
|
mapSize = MapSizeNew(mapWidth.toInt() + 1, mapHeight.toInt() + 1)
|
||||||
type = MapType.default
|
type = MapType.default
|
||||||
waterThreshold = -0.055f // Gives the same level as when waterThreshold was unused in MapType.default
|
waterThreshold = -0.1f // mainly land, gets about 30% water
|
||||||
modifyForEasterEgg()
|
modifyForEasterEgg()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -128,15 +128,15 @@ object MapShape : IsPartOfGameInfoSerialization {
|
|||||||
}
|
}
|
||||||
|
|
||||||
object MapType : IsPartOfGameInfoSerialization {
|
object MapType : IsPartOfGameInfoSerialization {
|
||||||
|
const val default = "Default"
|
||||||
const val pangaea = "Pangaea"
|
const val pangaea = "Pangaea"
|
||||||
const val continents = "Continents"
|
const val continents = "Continents"
|
||||||
const val fourCorners = "Four Corners"
|
const val fourCorners = "Four Corners"
|
||||||
const val perlin = "Perlin"
|
|
||||||
const val archipelago = "Archipelago"
|
const val archipelago = "Archipelago"
|
||||||
const val innerSea = "Inner Sea"
|
const val innerSea = "Inner Sea"
|
||||||
|
|
||||||
// Cellular automata
|
// Cellular automata style
|
||||||
const val default = "Default"
|
const val smoothedRandom = "Smoothed Random"
|
||||||
|
|
||||||
// Non-generated maps
|
// Non-generated maps
|
||||||
const val custom = "Custom"
|
const val custom = "Custom"
|
||||||
@ -178,7 +178,7 @@ class MapParameters : IsPartOfGameInfoSerialization {
|
|||||||
var vegetationRichness = 0.4f
|
var vegetationRichness = 0.4f
|
||||||
var rareFeaturesRichness = 0.05f
|
var rareFeaturesRichness = 0.05f
|
||||||
var resourceRichness = 0.1f
|
var resourceRichness = 0.1f
|
||||||
var waterThreshold = 0f
|
var waterThreshold = 0.0f
|
||||||
|
|
||||||
/** Shifts temperature (after random, latitude and temperatureExtremeness).
|
/** Shifts temperature (after random, latitude and temperatureExtremeness).
|
||||||
* For seasonal main menu background only, not user-accessible, thus transient and not cloned. */
|
* For seasonal main menu background only, not user-accessible, thus transient and not cloned. */
|
||||||
@ -221,7 +221,10 @@ class MapParameters : IsPartOfGameInfoSerialization {
|
|||||||
vegetationRichness = 0.4f
|
vegetationRichness = 0.4f
|
||||||
rareFeaturesRichness = 0.05f
|
rareFeaturesRichness = 0.05f
|
||||||
resourceRichness = 0.1f
|
resourceRichness = 0.1f
|
||||||
waterThreshold = 0f
|
waterThreshold = if (type == MapType.smoothedRandom)
|
||||||
|
-0.05f // make world about 55% land
|
||||||
|
else
|
||||||
|
0f
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getArea() = when {
|
fun getArea() = when {
|
||||||
|
@ -42,9 +42,9 @@ class MapLandmassGenerator(val ruleset: Ruleset, val randomness: MapGenerationRa
|
|||||||
MapType.innerSea -> createInnerSea(tileMap)
|
MapType.innerSea -> createInnerSea(tileMap)
|
||||||
MapType.continents -> createTwoContinents(tileMap)
|
MapType.continents -> createTwoContinents(tileMap)
|
||||||
MapType.fourCorners -> createFourCorners(tileMap)
|
MapType.fourCorners -> createFourCorners(tileMap)
|
||||||
MapType.perlin -> createPerlin(tileMap)
|
MapType.smoothedRandom -> generateLandCellularAutomata(tileMap)
|
||||||
MapType.archipelago -> createArchipelago(tileMap)
|
MapType.archipelago -> createArchipelago(tileMap)
|
||||||
MapType.default -> generateLandCellularAutomata(tileMap)
|
MapType.default -> createPerlin(tileMap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ class MapParametersTable(
|
|||||||
MapType.pangaea,
|
MapType.pangaea,
|
||||||
MapType.continents,
|
MapType.continents,
|
||||||
MapType.fourCorners,
|
MapType.fourCorners,
|
||||||
MapType.perlin,
|
MapType.smoothedRandom,
|
||||||
MapType.archipelago,
|
MapType.archipelago,
|
||||||
MapType.innerSea,
|
MapType.innerSea,
|
||||||
if (forMapEditor) MapType.empty else null
|
if (forMapEditor) MapType.empty else null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user