diff --git a/android/src/com/unciv/app/AndroidLauncher.kt b/android/src/com/unciv/app/AndroidLauncher.kt index 3d14f6e7ad..877c34e151 100644 --- a/android/src/com/unciv/app/AndroidLauncher.kt +++ b/android/src/com/unciv/app/AndroidLauncher.kt @@ -29,7 +29,7 @@ open class AndroidLauncher : AndroidApplication() { if(externalfilesDir!=null) GameSaver.externalFilesDirForAndroid = externalfilesDir.path } - val config = AndroidApplicationConfiguration().apply { useImmersiveMode = true } + val config = AndroidApplicationConfiguration().apply { useImmersiveMode = true; } val androidParameters = UncivGameParameters( version = BuildConfig.VERSION_NAME, crashReportSender = CrashReportSenderAndroid(this), diff --git a/buildSrc/src/main/kotlin/BuildConfig.kt b/buildSrc/src/main/kotlin/BuildConfig.kt index 7c09077162..2ed652b3fc 100644 --- a/buildSrc/src/main/kotlin/BuildConfig.kt +++ b/buildSrc/src/main/kotlin/BuildConfig.kt @@ -3,8 +3,8 @@ package com.unciv.build object BuildConfig { const val kotlinVersion = "1.4.30" const val appName = "Unciv" - const val appCodeNumber = 534 - const val appVersion = "3.13.3" + const val appCodeNumber = 535 + const val appVersion = "3.13.3-patch1" const val gdxVersion = "1.9.14" const val roboVMVersion = "2.3.1" diff --git a/core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt b/core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt index 7a4cd0e2ba..106eca1fef 100644 --- a/core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt +++ b/core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt @@ -218,8 +218,23 @@ class MapGenerator(val ruleset: Ruleset) { var temperature = (5.0 * latitudeTemperature + randomTemperature) / 6.0 temperature = abs(temperature).pow(1.0 - tileMap.mapParameters.temperatureExtremeness) * temperature.sign + // Old, static map generation rules - necessary for existing base ruleset mods to continue to function + if (ruleset.terrains.values.asSequence().flatMap { it.uniqueObjects } + .none { it.placeholderText == "Occurs at temperature between [] and [] and humidity between [] and []" }) { + tile.baseTerrain = when { + temperature < -0.4 -> if (humidity < 0.5) Constants.snow else Constants.tundra + temperature < 0.8 -> if (humidity < 0.5) Constants.plains else Constants.grassland + temperature <= 1.0 -> if (humidity < 0.7) Constants.desert else Constants.plains + else -> { + println(temperature) + Constants.lakes + } + } + continue + } + val matchingTerrain = ruleset.terrains.values.firstOrNull { - it.uniques.map { Unique(it) }.any { + it.uniqueObjects.any { it.placeholderText == "Occurs at temperature between [] and [] and humidity between [] and []" && it.params[0].toFloat() < temperature && temperature < it.params[1].toFloat() && it.params[2].toFloat() < humidity && humidity < it.params[3].toFloat() diff --git a/core/src/com/unciv/models/ruleset/tile/Terrain.kt b/core/src/com/unciv/models/ruleset/tile/Terrain.kt index 550dc29bf2..a901f9bc67 100644 --- a/core/src/com/unciv/models/ruleset/tile/Terrain.kt +++ b/core/src/com/unciv/models/ruleset/tile/Terrain.kt @@ -3,6 +3,7 @@ package com.unciv.models.ruleset.tile import com.badlogic.gdx.graphics.Color import com.unciv.Constants import com.unciv.models.ruleset.Ruleset +import com.unciv.models.ruleset.Unique import com.unciv.models.stats.NamedStats import com.unciv.models.translations.tr import com.unciv.ui.utils.colorFromRGB @@ -13,9 +14,6 @@ class Terrain : NamedStats() { var overrideStats = false - /** If true, other terrain layers can come over this one. For mountains, lakes etc. this is false */ - var canHaveOverlay = true - /** If true, nothing can be built here - not even resource improvements */ var unbuildable = false @@ -27,6 +25,7 @@ class Terrain : NamedStats() { /** Uniques (currently used only for Natural Wonders) */ val uniques = ArrayList() + val uniqueObjects: List by lazy { uniques.map { Unique(it) } } /** Natural Wonder weight: probability to be picked */ var weight = 10