working wire cutter (drops no wire)

This commit is contained in:
minjaesong
2021-09-18 21:01:06 +09:00
parent 097689f49f
commit 9e8bd5e4a9
8 changed files with 27 additions and 15 deletions

View File

@@ -331,6 +331,11 @@ open class GameWorld() : Disposable {
val wireNode = wirings[blockAddr]
if (wireNode != null) {
if (!bypassEvent) {
Terrarum.ingame?.queueWireChangedEvent(tile, true, x, y)
Terrarum.ingame?.modified(LandUtil.LAYER_WIRE, x, y)
}
// figure out wiring graphs
val matchingNeighbours = WireActor.WIRE_NEARBY.mapIndexed { index, (tx, ty) ->
(getAllWiresFrom(x + tx, y + ty)?.contains(tile) == true).toInt() shl index