Some initial complexity balancing
This commit is contained in:
parent
1aee318ccc
commit
345a24b1ed
@ -12,14 +12,16 @@ import org.apache.logging.log4j.LogManager
|
||||
import ru.dbotthepony.mc.otm.core.ImpreciseFraction
|
||||
import ru.dbotthepony.mc.otm.registry.MItems
|
||||
import ru.dbotthepony.mc.otm.registry.MRecipes
|
||||
import kotlin.math.pow
|
||||
import kotlin.math.sqrt
|
||||
|
||||
/**
|
||||
* baselineComplexityReplicateTicks * complexity = replicate ticks
|
||||
* baselineComplexityDecomposeTicks * complexity = decompose ticks
|
||||
*/
|
||||
const val baselineComplexityReplicateTicks = 2000.0
|
||||
const val baselineComplexityReplicateTicks = 1000.0
|
||||
const val baselineComplexityDecomposeTicks = 400.0
|
||||
const val baselineComplexityScanTicks = 12000.0
|
||||
const val baselineComplexityScanTicks = 4000.0
|
||||
|
||||
@JvmField val BASELINE = ImpreciseFraction(0.001)
|
||||
@JvmField val DIRT = BASELINE
|
||||
@ -75,7 +77,13 @@ private val mappedOutputs = HashMap<Item, ArrayList<Recipe<*>>>()
|
||||
private val mappedInputs = HashMap<Item, ArrayList<Recipe<*>>>()
|
||||
|
||||
private fun defaultComplexity(value: ImpreciseFraction): Double {
|
||||
return value.toDouble()
|
||||
val double = value.toDouble()
|
||||
|
||||
if (double < 1.0) {
|
||||
return sqrt(double)
|
||||
}
|
||||
|
||||
return double.pow(1.4)
|
||||
}
|
||||
|
||||
private fun make(item: Item, value: ImpreciseFraction, complexity: Double = defaultComplexity(value)) {
|
||||
|
Loading…
Reference in New Issue
Block a user