mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-11 14:21:52 +09:00
fourth purple wire because four-colour theorem
This commit is contained in:
@@ -19,6 +19,7 @@ import org.dyn4j.geometry.Vector2
|
||||
import java.lang.Math.pow
|
||||
import kotlin.math.cosh
|
||||
import kotlin.math.min
|
||||
import kotlin.math.pow
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
/**
|
||||
@@ -519,7 +520,7 @@ object WorldSimulator {
|
||||
}
|
||||
|
||||
private fun calculateDecay(signal: Vector2, dist: Int, wire: ItemID, signalType: WireEmissionType): Vector2 {
|
||||
return signal * pow(0.99, dist.toDouble())
|
||||
return signal * 0.995.pow(dist.toDouble())
|
||||
}
|
||||
|
||||
private fun traverseWireGraph(world: GameWorld, wire: ItemID, startingPoint: WireGraphCursor, signal: Vector2, signalType: WireEmissionType) {
|
||||
|
||||
@@ -49,9 +49,9 @@ open class Electric : FixtureBase {
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val ELECTRIC_THRESHOLD_HIGH = 0.9
|
||||
const val ELECTRIC_THRESHOLD_LOW = 0.1
|
||||
const val ELECTRIC_THRESHOLD_EDGE_DELTA = 0.7
|
||||
const val ELECTRIC_THRESHOLD_HIGH = 0.6666666666666666
|
||||
const val ELECTRIC_THRESHOLD_LOW = 0.3333333333333333
|
||||
const val ELECTRIC_THRESHOLD_EDGE_DELTA = 0.33333333333333337
|
||||
}
|
||||
|
||||
fun getWireEmitterAt(blockBoxIndex: BlockBoxIndex) = this.wireEmitterTypes[blockBoxIndex]
|
||||
|
||||
Reference in New Issue
Block a user