wire colour fade by signal strength

This commit is contained in:
minjaesong
2024-03-14 00:18:25 +09:00
parent 6abb6f84ef
commit 5b462a2559
4 changed files with 47 additions and 3 deletions

View File

@@ -520,7 +520,8 @@ object WorldSimulator {
}
private fun calculateDecay(signal: Vector2, dist: Int, wire: ItemID, signalType: WireEmissionType): Vector2 {
return signal * 0.995.pow(dist.toDouble())
val d = WireCodex.wireDecays[wire]!!
return signal * d.pow(dist.toDouble())
}
private fun traverseWireGraph(world: GameWorld, wire: ItemID, startingPoint: WireGraphCursor, signal: Vector2, signalType: WireEmissionType) {