Add powered neon wire rendering

This commit is contained in:
Your Name 2026-08-12 00:30:32 -04:00
parent cb1b5006b9
commit 17140fe39f
4 changed files with 71 additions and 0 deletions

View file

@ -169,6 +169,15 @@ test("a switchless wire component has no gameplay color", function()
assertTrue(world:wireColorAt(roomA, {x = 1, y = 1}, "circuit_a") == nil)
end)
test("wire power follows its terminal switch", function()
local world, roomA = makeWorld()
world:resolveCircuits()
assertFalse(world:wirePoweredAt(roomA, {x = 1, y = 1}, "circuit_a"))
world.collidableMatrices.blue[1] = {[4] = {}}
world:resolveCircuits()
assertTrue(world:wirePoweredAt(roomA, {x = 1, y = 1}, "circuit_a"))
end)
test("a door requires every independent switch run at its terminal", function()
local greenSwitch = switch("green", 1, 2)
local world, roomA, _, wiredDoor = makeWorld()