Files
room_glitch/tests/room_network/objective_agent.gd
T
Jeff Luke c1b2195834 Expand Glitch operations hub, cabinet authoring, deployment, and RFID support
Operator hub
- Introduce Escape Gallery branding and Glitch: the Dark Machine room views
- Add cabinet illustrations, Pac-Man marquee/gameplay artwork, and waiting states
- Add device feedback panels with RFID readings, input/output states, and stale status
- Add logged operator hardware interventions with request deduplication

Room and cabinet authoring
- Add a visual custom-PCB connection editor with per-cabinet device inventory
- Support device IDs, bindings, wiring notes, input polarity, and validation
- Add physical-room label/dimension toggles and editable doorway annotations
- Preserve doorway changes through undo, save, and revert
- Expand cabinet profiles, room layout, and Glitch scenario resources

Scenarios and gameplay
- Add per-assignment game configuration and runtime feature validation
- Add timed test wins and Frogger individual-home objectives
- Add the three-cabinet timed/score/Frogger test scenario
- Add Cabinet 1 Pac-Man RFID credits, credit sound, and CREDIT 0/1 display
- Require physical Start after an accepted scan and prevent duplicate credits

Pi hardware and deployment
- Add GPIO feedback sampling and a separate multiplexed RFID helper
- Validate reader pin ownership and input/output conflicts
- Add SSH cabinet startup and Pi desktop-session service support
- Add master packaging, site setup, SSH enrollment, and staged cabinet releases
- Verify deployment manifests and support explicit activation/status/log commands

Documentation and verification
- Consolidate the root README around the current architecture and setup workflow
- Add the complete master/Pi/RFID export and deployment walkthrough
- Document network isolation, credentials, card identification, and rollback
- Add PCB, room-editor, feedback, credit, deployment, and controller tests
- Isolate protocol tests from designer-edited cabinet configurations

Known limitations
- RFID helper compilation and physical Pi commissioning remain unverified
- Fleet provisioning does not yet configure RFID-only installations completely
- Broader Pac-Man tests retain a ghost-capture assertion failure
- Staged exports must be rebuilt and checked before deploying runtime 2.3
2026-10-17 14:53:54 -07:00

37 lines
1.4 KiB
GDScript

extends SceneTree
func _initialize() -> void:
call_deferred("run")
func run() -> void:
var agent = load("res://core/network/managed_cabinet.gd").new()
root.add_child(agent)
var injected := false
var started_at := -1
for i in range(350):
await create_timer(.1).timeout
if agent.phase == "playing" and started_at < 0: started_at = Time.get_ticks_msec()
if agent.phase == "playing" and not injected:
if agent.cabinet_id == "cabinet_02":
injected = true
agent.game._add_score(499)
assert(agent.game.is_running and agent.game.state != "victory", "499 must not win")
await create_timer(.3).timeout
assert(agent.phase == "playing")
agent.game._add_score(1)
elif agent.cabinet_id == "cabinet_03" and agent.game.phase == "play":
injected = true
assert(agent.game.homes.count(true) == 0)
agent.game.frog = Vector2(112,40)
agent.game.hop_left = 0
agent.game.step_world(0.0)
assert(agent.game.homes.count(true) == 1)
if agent.phase == "won":
if agent.cabinet_id == "cabinet_01":
assert(Time.get_ticks_msec()-started_at >= 4800, "Timer must run for five seconds")
elif agent.cabinet_id == "cabinet_02": assert(agent.game.score == 500)
elif agent.cabinet_id == "cabinet_03": assert(agent.game.homes.count(true) == 1)
await create_timer(1.0).timeout
quit()
return
push_error("Objective integration timed out on " + agent.cabinet_id)
quit(1)