diff --git a/core/src/com/unciv/ui/screens/newgamescreen/MapParametersTable.kt b/core/src/com/unciv/ui/screens/newgamescreen/MapParametersTable.kt index c4ec40d939..fb3c6f907a 100644 --- a/core/src/com/unciv/ui/screens/newgamescreen/MapParametersTable.kt +++ b/core/src/com/unciv/ui/screens/newgamescreen/MapParametersTable.kt @@ -14,7 +14,6 @@ import com.unciv.logic.map.MapShape import com.unciv.logic.map.MapSize import com.unciv.logic.map.MapSizeNew import com.unciv.logic.map.MapType -import com.unciv.logic.map.mapgenerator.MapGenerationRandomness import com.unciv.ui.components.ExpanderTab import com.unciv.ui.components.UncivSlider import com.unciv.ui.components.UncivTextField @@ -47,8 +46,6 @@ class MapParametersTable( lateinit var customMapWidth: TextField lateinit var customMapHeight: TextField - private val randomness = MapGenerationRandomness() - private lateinit var worldSizeSelectBox: TranslatedSelectBox private var customWorldSizeTable = Table () private var hexagonalSizeTable = Table() @@ -111,9 +108,9 @@ class MapParametersTable( mapShapesOptionsValues = mapShapes.toHashSet() val optionsTable = MultiCheckboxTable("{Enabled Map Shapes}", "NewGameMapShapes", mapShapesOptionsValues) { if (mapShapesOptionsValues.isEmpty()) { - mapParameters.shape = mapShapes.random(randomness.RNG) + mapParameters.shape = mapShapes.random() } else { - mapParameters.shape = mapShapesOptionsValues.random(randomness.RNG) + mapParameters.shape = mapShapesOptionsValues.random() } } add(optionsTable).colspan(2).grow().row() @@ -148,9 +145,9 @@ class MapParametersTable( mapTypesOptionsValues = mapTypes.toHashSet() val optionsTable = MultiCheckboxTable("{Enabled Map Generation Types}", "NewGameMapGenerationTypes", mapTypesOptionsValues) { if (mapTypesOptionsValues.isEmpty()) { - mapParameters.type = mapTypes.random(randomness.RNG) + mapParameters.type = mapTypes.random() } else { - mapParameters.type = mapTypesOptionsValues.random(randomness.RNG) + mapParameters.type = mapTypesOptionsValues.random() } } add(optionsTable).colspan(2).grow().row() @@ -176,9 +173,9 @@ class MapParametersTable( mapSizesOptionsValues = mapSizes.toHashSet() val optionsTable = MultiCheckboxTable("{Enabled World Sizes}", "NewGameWorldSizes", mapSizesOptionsValues) { if (mapSizesOptionsValues.isEmpty()) { - mapParameters.mapSize = MapSizeNew(mapSizes.random(randomness.RNG)) + mapParameters.mapSize = MapSizeNew(mapSizes.random()) } else { - mapParameters.mapSize = MapSizeNew(mapSizesOptionsValues.random(randomness.RNG)) + mapParameters.mapSize = MapSizeNew(mapSizesOptionsValues.random()) } } add(optionsTable).colspan(2).grow().row() @@ -269,9 +266,9 @@ class MapParametersTable( mapResourcesOptionsValues = mapResources.toHashSet() val optionsTable = MultiCheckboxTable("{Enabled Resource Settings}", "NewGameResourceSettings", mapResourcesOptionsValues) { if (mapResourcesOptionsValues.isEmpty()) { - mapParameters.mapResources = mapResources.random(randomness.RNG) + mapParameters.mapResources = mapResources.random() } else { - mapParameters.mapResources = mapResourcesOptionsValues.random(randomness.RNG) + mapParameters.mapResources = mapResourcesOptionsValues.random() } } add(optionsTable).colspan(2).grow().row()