saumwacht-godot/tools/verify_phase4_gallery.gd
Martin Stickelbroeck c2b447610c Baseline: Saumwacht 0.15.0 (Phase 20A) vor dem Umbau zu Champions of Luneraria
Unveränderter Ausgangsstand inklusive Masterprompt und Konzeptbildern
unter assets/. .godot/ und docs/screenshots/ bleiben laut .gitignore
unversioniert; letztere sind unter ../backups gesichert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 20:00:36 +02:00

35 lines
1.4 KiB
GDScript

extends SceneTree
## Actual UI smoke check and fresh workshop screenshot. Requires a display.
func _initialize() -> void:
call_deferred("_run")
func _run() -> void:
var gallery: Control = load("res://tools/model_gallery.tscn").instantiate()
root.add_child(gallery)
await process_frame
assert(gallery._asset_select.item_count == 59)
assert(gallery._icon.texture != null)
for index: int in range(gallery._faction_select.item_count):
if gallery._faction_select.get_item_metadata(index) == "nebelchor":
gallery._faction_select.select(index)
gallery._faction_select.item_selected.emit(index)
assert(gallery._asset_select.item_count == 10)
gallery._asset_select.select(7)
gallery._asset_select.item_selected.emit(7)
assert(gallery._title.text == "Hohlgeläut")
assert(gallery._icon.texture != null)
var turntable: Node3D = gallery._view["turntable"]
assert(turntable.get_child_count() == 1)
gallery._auto_rotate.button_pressed = true
await create_timer(0.25).timeout
assert(turntable.rotation.y > 0.0)
gallery._auto_rotate.button_pressed = false
gallery._reset_view()
assert(turntable.rotation == Vector3.ZERO)
await process_frame
await RenderingServer.frame_post_draw
var result: Error = root.get_texture().get_image().save_png("res://docs/screenshots/phase4/models-workshop.png")
assert(result == OK)
print("GALLERY_PASS: 59 entries, faction filter, N08 reference, rotation, reset and screenshot")
quit(0)