Remove "withRandom"
This commit is contained in:
parent
8f407465f5
commit
3b642ffe40
@ -16,21 +16,9 @@ data class TerrainSelectorParameters(
|
|||||||
) {
|
) {
|
||||||
fun withSeed(seed: Long) = copy(seed = seed)
|
fun withSeed(seed: Long) = copy(seed = seed)
|
||||||
fun withCommonality(commonality: Double) = copy(commonality = commonality)
|
fun withCommonality(commonality: Double) = copy(commonality = commonality)
|
||||||
private var random: RandomGenerator? = null
|
|
||||||
|
|
||||||
fun random(): RandomGenerator {
|
fun random(): RandomGenerator {
|
||||||
return random ?: ru.dbotthepony.kstarbound.util.random.random(seed)
|
return 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 }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun noiseAngle(x: Int): Pair<Double, Double> {
|
fun noiseAngle(x: Int): Pair<Double, Double> {
|
||||||
|
Loading…
Reference in New Issue
Block a user