Version rollout (#10848)

* Bump version and create initial changelog entry

* Use randomize seed checkbox for partial generation (#10844)

* use randomize seed checkbox for partial generation and debug the behavior of raiseMountainsAndHills in partial generation

* small changes

* Update Finnish.properties (#10843)

* Update Finnish.properties

* Update Finnish.properties

* Update Finnish.properties

* Update Korean.properties (#10842)

* Update French.properties (#10838)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Rémi Dufour <remi.dufour@protonmail.com>
Co-authored-by: Securetux <110048962+Securetux@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
This commit is contained in:
Yair Morgenstern
2023-12-31 23:09:09 +02:00
committed by GitHub
parent 15a17335c1
commit 1cd72e4272
9 changed files with 229 additions and 173 deletions

View File

@ -464,7 +464,7 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci
companion object {
//region AUTOMATICALLY GENERATED VERSION DATA - DO NOT CHANGE THIS REGION, INCLUDING THIS COMMENT
val VERSION = Version("4.9.14", 950)
val VERSION = Version("4.9.15", 951)
//endregion
lateinit var Current: UncivGame

View File

@ -407,10 +407,29 @@ class MapGenerator(val ruleset: Ruleset, private val coroutineScope: CoroutineSc
elevation = abs(elevation).pow(1.0 - tileMap.mapParameters.elevationExponent.toDouble()) * elevation.sign
when {
elevation <= 0.5 -> tile.baseTerrain = flat
elevation <= 0.7 && hill != null -> tile.addTerrainFeature(hill)
elevation <= 0.5 -> {
tile.baseTerrain = flat
if (hill != null && tile.terrainFeatures.contains(hill)) {
tile.removeTerrainFeature(hill)
}
}
elevation <= 0.7 && hill != null -> {
tile.addTerrainFeature(hill)
tile.baseTerrain = flat
}
elevation <= 0.7 && hill == null -> tile.baseTerrain = flat // otherwise would be hills become mountains
elevation <= 1.0 && mountain != null -> tile.baseTerrain = mountain
elevation > 0.7 && mountain != null -> {
tile.baseTerrain = mountain
if (hill != null && tile.terrainFeatures.contains(hill)) {
tile.removeTerrainFeature(hill)
}
}
else -> {
tile.baseTerrain = flat
if (hill != null && tile.terrainFeatures.contains(hill)) {
tile.removeTerrainFeature(hill)
}
}
}
tile.setTerrainTransients()
}

View File

@ -39,11 +39,6 @@ class MapEditorGenerateTab(
private val newTab = MapEditorNewMapTab(this)
private val partialTab = MapEditorGenerateStepsTab(this)
// Since we allow generation components to be run repeatedly, it might surprise the user that
// the outcome stays the same when repeated - due to them operating on the same seed.
// So we change the seed behind the scenes if already used for a certain step...
private val seedUsedForStep = mutableSetOf<MapGeneratorSteps>()
init {
name = "Generate"
top()
@ -66,14 +61,11 @@ class MapEditorGenerateTab(
}
private fun generate(step: MapGeneratorSteps) {
if (step == MapGeneratorSteps.All && newTab.mapParametersTable.randomizeSeed) {
if (newTab.mapParametersTable.randomizeSeed) {
// reseed visibly if the "Randomize seed" checkbox is checked
newTab.mapParametersTable.reseed()
}
if (step == MapGeneratorSteps.Landmass && step in seedUsedForStep) {
// reseed visibly when starting from scratch (new seed shows in advanced settings widget)
newTab.mapParametersTable.reseed()
seedUsedForStep -= step
}
val mapParameters = editorScreen.newMapParameters.clone() // this clone is very important here
val message = mapParameters.mapSize.fixUndesiredSizes(mapParameters.worldWrap)
if (message != null) {
@ -93,11 +85,6 @@ class MapEditorGenerateTab(
return
}
if (step in seedUsedForStep) {
mapParameters.reseed()
} else if (step != MapGeneratorSteps.All){
seedUsedForStep += step
}
Gdx.input.inputProcessor = null // remove input processing - nothing will be clicked!
setButtonsEnabled(false)