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:
Takeshi
2026-10-11 15:58:00 +09:00
parent 39f6068461
commit b84bade045
235 changed files with 495831 additions and 312 deletions
@@ -1,5 +1,8 @@
extends SceneTree
const FixtureCleanup := preload("res://tests/helpers/ui_audio_fixture_cleanup.gd")
var _finishing := false
## A real inn from the default 5,000 G / 50 materials. No inserted guests,
## inventory, employees, completed construction, or free resource commands.
var _checks := 0
@@ -51,6 +54,9 @@ func _run() -> void:
await _advance(10)
for facility: FacilityInstance in _runtime.facility_service.get_instances():
_ids[facility.definition_id] = facility.instance_id
if not _command(&"set_facility_conditions", {&"facility_id": _ids[&"cafeteria"], &"conditions": {&"related_facility_id": _ids[&"kitchen"]}}):
_finish()
return
for assignment: Array in [[&"staff_akane", &"reception"], [&"staff_gina", &"warehouse"], [&"staff_chika", &"kitchen"], [&"staff_iris", &"cafeteria"], [&"staff_juno", &"cafeteria"]]:
if not _command(&"hire_staff_candidate", {&"candidate_id": assignment[0]}) or not _command(&"set_staff_work_assignment", {&"staff_id": assignment[0], &"facility_id": _ids[assignment[1]], &"template_id": &"DAY"}):
_finish()
@@ -225,6 +231,14 @@ func _expect(condition: bool, message: String) -> void:
func _finish() -> void:
if _finishing:
return
_finishing = true
if is_instance_valid(_main):
var final_cleanup: Dictionary = await FixtureCleanup.free_owner_and_wait(self, _main)
if not bool(final_cleanup.get(&"passed", false)):
_failures += 1
push_error("ordinary Main final audio cleanup failed")
SaveService.delete_save(_save_path)
print("Normal auto purchase chain: %d checks, %d failures" % [_checks, _failures])
quit(1 if _failures > 0 else 0)