mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-10 07:16:54 +07:00
3.13.3-patch1
This commit is contained in:
parent
d6e75c7ea2
commit
ed8d642036
@ -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),
|
||||
|
@ -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"
|
||||
|
@ -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()
|
||||
|
@ -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<String>()
|
||||
val uniqueObjects: List<Unique> by lazy { uniques.map { Unique(it) } }
|
||||
|
||||
/** Natural Wonder weight: probability to be picked */
|
||||
var weight = 10
|
||||
|
Loading…
Reference in New Issue
Block a user