Files
security-game/src/test/take_screenshot.gd
T
zwitschi 439e0a4281
CI / headless-tests (push) Canceled after 49s
Implement prototype: venue-driven simulation core, scenarios, tests, and playable entrance scene
- 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
2026-10-31 11:37:54 +01:00

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