diff --git a/core/src/com/unciv/UncivGame.kt b/core/src/com/unciv/UncivGame.kt index 14750d9cd1..bc363a76bc 100644 --- a/core/src/com/unciv/UncivGame.kt +++ b/core/src/com/unciv/UncivGame.kt @@ -38,7 +38,7 @@ class UncivGame( * This exists so that when debugging we can see the entire map. * Remember to turn this to false before commit and upload! */ - var viewEntireMapForDebug = false + var viewEntireMapForDebug = true /** For when you need to test something in an advanced game and don't have time to faff around */ val superchargedForDebug = false diff --git a/core/src/com/unciv/logic/map/MapGenerator.kt b/core/src/com/unciv/logic/map/MapGenerator.kt index 7c4b03fd87..efdd6aec60 100644 --- a/core/src/com/unciv/logic/map/MapGenerator.kt +++ b/core/src/com/unciv/logic/map/MapGenerator.kt @@ -8,8 +8,6 @@ import com.unciv.models.ruleset.Ruleset import com.unciv.models.ruleset.tile.ResourceType import com.unciv.models.ruleset.tile.Terrain import com.unciv.models.ruleset.tile.TerrainType -import kotlin.collections.ArrayList -import kotlin.collections.HashMap import kotlin.math.* import kotlin.random.Random @@ -493,10 +491,10 @@ class MapGenerator(val ruleset: Ruleset) { val suitableTiles = mapToReturn.values .filter { it.resource == null && resource.terrainsCanBeFoundOn.contains(it.getLastTerrain().name) } - val averageTilesPerResource = 15 * resourcesOfType.count() - val numberOfResources = mapToReturn.values.count { it.isLand && !it.getBaseTerrain().impassable } / averageTilesPerResource + val numberOfResources = mapToReturn.values.count { it.isLand && !it.getBaseTerrain().impassable } * + mapToReturn.mapParameters.resourceRichness - val locations = chooseSpreadOutLocations(numberOfResources, suitableTiles, distance) + val locations = chooseSpreadOutLocations(numberOfResources.toInt(), suitableTiles, distance) for (location in locations) location.resource = resource.name } @@ -508,8 +506,9 @@ class MapGenerator(val ruleset: Ruleset) { val suitableTiles = mapToReturn.values .filter { it.resource == null && resourcesOfType.any { r -> r.terrainsCanBeFoundOn.contains(it.getLastTerrain().name) } } - val numberOfResources = (mapToReturn.values.count { it.isLand && !it.getBaseTerrain().impassable } * mapToReturn.mapParameters.resourceRichness).toInt() - val locations = chooseSpreadOutLocations(numberOfResources, suitableTiles, distance) + val numberOfResources = mapToReturn.values.count { it.isLand && !it.getBaseTerrain().impassable } * + mapToReturn.mapParameters.resourceRichness + val locations = chooseSpreadOutLocations(numberOfResources.toInt(), suitableTiles, distance) val resourceToNumber = Counter() diff --git a/core/src/com/unciv/ui/newgamescreen/MapParametersTable.kt b/core/src/com/unciv/ui/newgamescreen/MapParametersTable.kt index 6f6b14ff79..15570ce209 100644 --- a/core/src/com/unciv/ui/newgamescreen/MapParametersTable.kt +++ b/core/src/com/unciv/ui/newgamescreen/MapParametersTable.kt @@ -166,7 +166,7 @@ class MapParametersTable(val mapParameters: MapParameters, val isEmptyMapAllowed advancedSettingsTable.add(tempExtremeSlider).fillX().row() - val resourceRichnessSlider = Slider(0f,1f,0.01f, false, skin).apply { + val resourceRichnessSlider = Slider(0f,0.2f,0.01f, false, skin).apply { addListener(object : ChangeListener() { override fun changed(event: ChangeEvent?, actor: Actor?) { mapParameters.resourceRichness = this@apply.value diff --git a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt index fcc31f5a89..a7b637dc0d 100644 --- a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt +++ b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt @@ -347,10 +347,10 @@ class DiplomacyScreen(val viewingCiv:CivilizationInfo):CameraStageBaseScreen() { relationshipTable.add("Our relationship: ".toLabel()) val relationshipLevel = otherCivDiplomacyManager.relationshipLevel() val relationshipText = relationshipLevel.name.tr() + " ($opinionOfUs)" - val relationshipColor = when { - relationshipLevel == RelationshipLevel.Neutral -> Color.WHITE - relationshipLevel == RelationshipLevel.Favorable || relationshipLevel == RelationshipLevel.Friend - || relationshipLevel == RelationshipLevel.Ally -> Color.GREEN + val relationshipColor = when (relationshipLevel) { + RelationshipLevel.Neutral -> Color.WHITE + RelationshipLevel.Favorable, RelationshipLevel.Friend, + RelationshipLevel.Ally -> Color.GREEN else -> Color.RED }