CI / headless-tests (push) Canceled after 49s
- Godot 4.3 project scaffold with first-person guard, procedural world, interaction HUD, access inspection, radio forms, debug overlay, shift review - Simulation core: ShiftCoordinator, VenueScenario, EventScheduler, NPCController/FSM, AccessVerifier, EscalationManager, RadioSystem, IncidentRecorder, ReputationEvaluator, CrowdSystem, EventBus - Three authored scenarios (Hollywood Blvd building, The Joke Shop, TV studio) - Custom headless test runner (25 tests) replacing editor-dependent GUT, plus GitHub Actions CI - Documentation workflow live: README, PLAN (tech stack), TODO/DONE, MEMORY
26 lines
686 B
GDScript
26 lines
686 B
GDScript
extends SceneTree
|
|
## Dev helper: run the game windowed for N frames, save a screenshot, quit.
|
|
## Usage: godot --path . -s res://src/test/take_screenshot.gd (windowed)
|
|
|
|
var frames := 0
|
|
const TARGET_FRAMES := 300
|
|
|
|
func _initialize() -> void:
|
|
# Launch the main scene.
|
|
var packed: PackedScene = load("res://scenes/main.tscn")
|
|
var inst: Node = packed.instantiate()
|
|
root.add_child(inst)
|
|
|
|
func _process(_delta: float) -> bool:
|
|
frames += 1
|
|
if frames == 60:
|
|
var img: Image = root.get_texture().get_image()
|
|
var err := img.save_png("user://screenshot.png")
|
|
print("screenshot saved err=", err)
|
|
quit(0)
|
|
return true
|
|
if frames > TARGET_FRAMES:
|
|
quit(0)
|
|
return true
|
|
return false
|