18 lines
665 B
GDScript
18 lines
665 B
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)
|
|
# Only the test harness forces a win; production has no remote force-win endpoint.
|
|
for i in range(140):
|
|
await create_timer(.1).timeout
|
|
if agent.phase == "playing":
|
|
agent.game.win_game()
|
|
if agent.phase == "won" and ("--test-no-reward" in OS.get_cmdline_user_args() or agent.outcomes.values().any(func(r): return str(r.detail).contains("GPIO bridge accepted"))):
|
|
await create_timer(1.0).timeout
|
|
quit()
|
|
return
|
|
push_error("Managed cabinet integration timed out")
|
|
quit(1)
|