wire: off-to-on traversal of nonbranching wire connection

This commit is contained in:
minjaesong
2021-08-11 16:45:39 +09:00
parent bfdfa17e3e
commit 7bb921321f
3 changed files with 100 additions and 44 deletions

View File

@@ -46,11 +46,11 @@ class WireGraphDebugger(originalID: ItemID) : GameItem(originalID) {
sb.clear()
Terrarum.ingame!!.world.getAllWiringGraph(mx, my)?.let {
it.forEachIndexed { index, (itemID, simCell) ->
it.forEach { (itemID, simCell) ->
if (sb.isNotEmpty()) sb.append('\n')
val connexionIcon = (simCell.con + 0xE0A0).toChar()
val connexionIcon = (simCell.connections + 0xE0A0).toChar()
val wireName = WireCodex[itemID].nameKey
val emit = simCell.emitState