diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/defs/world/TerrainSelectorParameters.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/defs/world/TerrainSelectorParameters.kt index fbf4f5de..434e1fa6 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/defs/world/TerrainSelectorParameters.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/defs/world/TerrainSelectorParameters.kt @@ -16,21 +16,9 @@ data class TerrainSelectorParameters( ) { fun withSeed(seed: Long) = copy(seed = seed) fun withCommonality(commonality: Double) = copy(commonality = commonality) - private var random: RandomGenerator? = null fun random(): RandomGenerator { - return random ?: ru.dbotthepony.kstarbound.util.random.random(seed) - } - - fun withRandom(): TerrainSelectorParameters { - if (random == null) - return withRandom(ru.dbotthepony.kstarbound.util.random.random(seed)) - - return this - } - - fun withRandom(randomGenerator: RandomGenerator): TerrainSelectorParameters { - return copy().also { it.random = randomGenerator } + return ru.dbotthepony.kstarbound.util.random.random(seed) } fun noiseAngle(x: Int): Pair {