Always add habitable world
authorTheSaminator <thesaminator@users.noreply.github.com>
Tue, 5 Jul 2022 17:00:55 +0000 (13:00 -0400)
committerTheSaminator <thesaminator@users.noreply.github.com>
Tue, 5 Jul 2022 17:00:55 +0000 (13:00 -0400)
src/jvmMain/kotlin/net/starshipfights/campaign/cluster_gen.kt

index a3a1fbc72721e6e4ed510a25c9a30d79648aa5a3..c96f6b46f5c5aca96ef2575cced9c9a9a1e71458 100644 (file)
@@ -316,7 +316,7 @@ class ClusterGenerator(val settings: ClusterGenerationSettings) {
                                val planetType = habitability.randomPlanetType()
                                val planetSize = planetType.sizeRange.random()
                                
-                               if (Random.nextDouble() < settings.planetDensity.chanceToAdd)
+                               if (planetType == PlanetType.TERRESTRIAL || Random.nextDouble() < settings.planetDensity.chanceToAdd)
                                        emit(
                                                UnnamedCelestialObject.Planet(
                                                        position = planetPos,