Save The Tree implementation and acceptance work in progress
Preserve production code, regression fixtures, audio assets and provenance, test infrastructure, and the original-completion plan and progress ledger. Final game and Windows acceptance remain pending; excluded local artifacts and native experiments are not part of this snapshot.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
extends SceneTree
|
||||
const FixtureCleanup := preload("res://tests/helpers/ui_audio_fixture_cleanup.gd")
|
||||
var checks:=0
|
||||
var failures:=0
|
||||
func expect(ok:bool,label:String)->void:
|
||||
@@ -38,7 +39,14 @@ func run()->void:
|
||||
for f:FacilityInstance in runtime.facility_service.get_instances():
|
||||
if f.definition_id==&"chapel":chapel=f
|
||||
expect(chapel!=null,"normal construction UI creates chapel")
|
||||
if chapel==null:main.queue_free();quit(failures);return
|
||||
if chapel==null:
|
||||
var early_cleanup: Dictionary = await FixtureCleanup.free_owner_and_wait(self, main)
|
||||
if not bool(early_cleanup.get(&"passed", false)):
|
||||
push_error("Chapel ordinary owner cleanup failed: %s" % str(early_cleanup))
|
||||
quit(96)
|
||||
return
|
||||
quit(failures)
|
||||
return
|
||||
expect(chapel.state==FacilityInstance.State.NO_STAFF,"chapel waits for cleric")
|
||||
recruit_cleric(main, runtime)
|
||||
expect(runtime.staff_service.has_staff(cleric_id()),"normal hire control recruits cleric")
|
||||
@@ -81,5 +89,9 @@ func run()->void:
|
||||
root.size=Vector2i(1440,900)
|
||||
await process_frame;await process_frame;await RenderingServer.frame_post_draw
|
||||
expect(root.get_texture().get_image().save_png(ProjectSettings.globalize_path(OS.get_environment("THE_TREE_CHAPEL_CAPTURE_PATH") if not OS.get_environment("THE_TREE_CHAPEL_CAPTURE_PATH").is_empty() else "res://artifacts/facility-dimensions-2026-09-29/chapel-gameplay.png"))==OK,"capture native chapel business screen")
|
||||
main.queue_free();await process_frame
|
||||
var cleanup: Dictionary = await FixtureCleanup.free_owner_and_wait(self, main)
|
||||
if not bool(cleanup.get(&"passed", false)):
|
||||
push_error("Chapel ordinary owner cleanup failed: %s" % str(cleanup))
|
||||
quit(96)
|
||||
return
|
||||
print("Chapel gameplay: %d checks, %d failures"%[checks,failures]);quit(failures)
|
||||
|
||||
Reference in New Issue
Block a user