This commit is contained in:
Forrest 2026-10-07 14:50:55 -04:00
parent 215e24e246
commit bbd8012fff
16 changed files with 510 additions and 213 deletions

View file

@ -396,15 +396,12 @@ func _night_jump(r: GameTestRunner, farm: Node3D, sim: FarmSim) -> void:
f3.physical_keycode = KEY_F3
f3.pressed = true
debug._unhandled_input(f3)
var tonight := sim.waves.plan_for(2).title
var body := (sim.review_panel._body as Label).text
r.check(c.state == s and s.night == 2 and s.nights_survived == 1 and s.phase == P.MORNING,
"F3: the morning of day 2 (%d survived)" % s.nights_survived)
r.check(s.structure(fence).size() > 0 and s.resources.shed == shed and s.scarecrow_hp == s.scarecrow_max_hp - 1
and s.crops_total == crops and st.has_workbench(),
"the farm is as it was (the fence, the shed, the scarecrow's HP), and the Workbench is granted")
r.check(c.morning_snapshot() == s.to_dict() and sim.review_panel.visible and body.contains("Tonight: %s." % tonight),
"the retry snapshot and the review panel are day 2's")
r.check(c.morning_snapshot() == s.to_dict() and sim.review_panel.visible, "the retry snapshot is day 2's, and the review panel is up")
debug._unhandled_input(f3)
r.check(s.night == 3 and s.nights_survived == 2 and s.crops_total == crops + 30 and sim.loot.count(LootSystem.Status.DORMANT) == dormant - 30,
"F3 again: day 3, and the field due after night 2 sprouts (%d crops)" % s.crops_total)