extends SceneTree ## Drive a whole Gauntlet run headlessly: switch mode, confirm the cabinet bank exists ## and is labelled, open every drawer of the target, and check the shredder actually ## empties them. Faster than eyeballing video, and it catches the failure that matters — ## a run you cannot finish because the files never become destroyable. ## ## Godot --headless --path game --script dev/probe_gauntlet.gd func _initialize() -> void: var main: Node = (load("res://main.tscn") as PackedScene).instantiate() get_root().add_child(main) for i in 4: await physics_frame var modes = main.get("_modes") var g = main.get("_gauntlet") modes.set_mode(Modes.M.GAUNTLET) for i in 4: await physics_frame print("mode : ", modes.name_of()) print("client : ", g.client, " -> drawer ", g.target_range) print("files on them : ", g.remaining(), " / ", g.total()) var cabs = g._cabs print("cabinets : ", cabs.size(), " labels: ", ", ".join(PackedStringArray(cabs.map(func(c): return c.label_range)))) print("shredder found: ", g._shredder != null) # open every drawer of the target cabinet and let them slide var target = g._target for i in Cabinet.DRAWERS: target.open(i) for i in 90: await physics_frame print("after opening : files still intact = ", g.remaining()) # stand at the shredder and feed it var player = main.get("_player") player.global_position = g._shredder.global_position await physics_frame print("at shredder : ", g.at_shredder()) g.interact() for i in 10: await physics_frame print("after shred : files still intact = ", g.remaining()) print("running : ", g.running, " result: ", g.result) # and the other modes at least arm for m in [Modes.M.TOTAL, Modes.M.CLOCK, Modes.M.CUBICLE_HELL]: modes.set_mode(m) await physics_frame print("mode %-20s -> %s" % [modes.name_of(), modes.hud_line().substr(0, 60)]) quit()