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
|
||||
var runtime: Variant
|
||||
@@ -30,19 +31,55 @@ func run() -> void:
|
||||
main.build_buttons[&"infirmary"].button_pressed = true
|
||||
main._on_map_cell_clicked(Vector3i(-6,0,1))
|
||||
expect(runtime.construction_service.get_jobs().size() == 1, "map click starts infirmary construction")
|
||||
if not command(&"build_facility",{&"definition_id":&"staff_door",&"origin":Vector3i(-1,0,1) if elevator_mode else Vector3i(0,0,1)}): quit(1); return
|
||||
if not command(&"build_facility",{&"definition_id":&"staff_door",&"origin":Vector3i(-1,0,1) if elevator_mode else Vector3i(0,0,1)}):
|
||||
var _audio_cleanup_early_0: Dictionary = await FixtureCleanup.free_owner_and_wait(self, main)
|
||||
if not bool(_audio_cleanup_early_0.get(&"passed", false)):
|
||||
push_error("Ordinary fixture audio cleanup failed: %s" % str(_audio_cleanup_early_0))
|
||||
quit(96)
|
||||
return
|
||||
quit(1); return
|
||||
if elevator_mode:
|
||||
if not command(&"build_facility",{&"definition_id":&"service_elevator",&"origin":Vector3i(0,0,1)}): quit(1); return
|
||||
if not command(&"build_facility",{&"definition_id":&"service_elevator",&"origin":Vector3i(0,0,1)}):
|
||||
var _audio_cleanup_early_1: Dictionary = await FixtureCleanup.free_owner_and_wait(self, main)
|
||||
if not bool(_audio_cleanup_early_1.get(&"passed", false)):
|
||||
push_error("Ordinary fixture audio cleanup failed: %s" % str(_audio_cleanup_early_1))
|
||||
quit(96)
|
||||
return
|
||||
quit(1); return
|
||||
clock.advance_minutes(400 if elevator_mode else 180)
|
||||
var clinic: FacilityInstance
|
||||
for room: FacilityInstance in runtime.facility_service.get_instances():
|
||||
if room.definition_id == &"infirmary": clinic = room
|
||||
expect(clinic != null and clinic.operation_state == FacilityInstance.OperationState.OPERATING, "paid infirmary completes and operates")
|
||||
if clinic == null: quit(1); return
|
||||
if not command(&"hire_staff_candidate",{&"candidate_id":&"staff_tessa"}): quit(1); return
|
||||
if not command(&"set_staff_work_assignment",{&"staff_id":&"staff_tessa",&"facility_id":clinic.instance_id,&"template_id":&"DAY"}): quit(1); return
|
||||
if clinic == null:
|
||||
var _audio_cleanup_early_2: Dictionary = await FixtureCleanup.free_owner_and_wait(self, main)
|
||||
if not bool(_audio_cleanup_early_2.get(&"passed", false)):
|
||||
push_error("Ordinary fixture audio cleanup failed: %s" % str(_audio_cleanup_early_2))
|
||||
quit(96)
|
||||
return
|
||||
quit(1); return
|
||||
if not command(&"hire_staff_candidate",{&"candidate_id":&"staff_tessa"}):
|
||||
var _audio_cleanup_early_3: Dictionary = await FixtureCleanup.free_owner_and_wait(self, main)
|
||||
if not bool(_audio_cleanup_early_3.get(&"passed", false)):
|
||||
push_error("Ordinary fixture audio cleanup failed: %s" % str(_audio_cleanup_early_3))
|
||||
quit(96)
|
||||
return
|
||||
quit(1); return
|
||||
if not command(&"set_staff_work_assignment",{&"staff_id":&"staff_tessa",&"facility_id":clinic.instance_id,&"template_id":&"DAY"}):
|
||||
var _audio_cleanup_early_4: Dictionary = await FixtureCleanup.free_owner_and_wait(self, main)
|
||||
if not bool(_audio_cleanup_early_4.get(&"passed", false)):
|
||||
push_error("Ordinary fixture audio cleanup failed: %s" % str(_audio_cleanup_early_4))
|
||||
quit(96)
|
||||
return
|
||||
quit(1); return
|
||||
# Injury is the only fixture injection; the rescuer is hired and commutes normally.
|
||||
if not command(&"register_staff",{&"staff_id":&"injured_worker",&"role_id":&"porter",&"options":{&"health":0,&"current_cell":Vector3i(0,1,1) if elevator_mode else Vector3i(3,0,1)}}): quit(1); return
|
||||
if not command(&"register_staff",{&"staff_id":&"injured_worker",&"role_id":&"porter",&"options":{&"health":0,&"current_cell":Vector3i(0,1,1) if elevator_mode else Vector3i(3,0,1)}}):
|
||||
var _audio_cleanup_early_5: Dictionary = await FixtureCleanup.free_owner_and_wait(self, main)
|
||||
if not bool(_audio_cleanup_early_5.get(&"passed", false)):
|
||||
push_error("Ordinary fixture audio cleanup failed: %s" % str(_audio_cleanup_early_5))
|
||||
quit(96)
|
||||
return
|
||||
quit(1); return
|
||||
main._activate_management_mode(&"staff")
|
||||
main.staff_management_panel.select_staff(&"injured_worker")
|
||||
main.world_preview.focus_operating_area()
|
||||
@@ -75,7 +112,11 @@ func run() -> void:
|
||||
expect(runtime.staff_service.get_staff(&"injured_worker").health == 100, "treatment completes through normal Runtime ticks")
|
||||
expect(runtime.economy_service.get_balance(&"PLAYER_CASH") < 5000, "medical building and hiring are actually paid")
|
||||
expect(runtime.staff_service.validate_invariants()[&"ok"], "normal rescue preserves ownership")
|
||||
main.queue_free()
|
||||
var _audio_cleanup_final: Dictionary = await FixtureCleanup.free_owner_and_wait(self, main)
|
||||
if not bool(_audio_cleanup_final.get(&"passed", false)):
|
||||
push_error("Ordinary fixture audio cleanup failed: %s" % str(_audio_cleanup_final))
|
||||
quit(96)
|
||||
return
|
||||
await process_frame
|
||||
print("Rescue UI: %d checks, %d failures" % [checks,failures])
|
||||
quit(failures)
|
||||
|
||||
Reference in New Issue
Block a user