diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-21 11:52:07 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-21 11:52:07 +0800 |
| commit | 3812e78ba39764b3844d52ee7382b1350960ecb9 (patch) | |
| tree | 840a74803739582320bb61fac1963c3c0b8e39e1 | |
| parent | ac4fd29899e2fed8cb53d771325994ed481eae6b (diff) | |
| download | living-village-3812e78ba39764b3844d52ee7382b1350960ecb9.tar.gz | |
test(desktop): 自动演示在标题与键位页停留取证
LV_AUTOPLAY_FLOW 在主菜单标题画面与操作说明页各停留 60 帧,使 10fps 录屏可稳定采样两页证据帧;其余流程步骤与日志保持不变。
| -rw-r--r-- | src/LivingVillage.Desktop/Game.fs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs index 9e229aa..c8d0044 100644 --- a/src/LivingVillage.Desktop/Game.fs +++ b/src/LivingVillage.Desktop/Game.fs @@ -141,6 +141,7 @@ type LivingVillageGame() as this = let mutable menu = MenuState.create startSimulationControl false let mutable autoplayFrames = 0 let mutable flowStep = 0 + let mutable flowHold = 0 let mutable sampleState = SampleScript.initial let mutable hudClock = 0L let mutable hudStatus = "" @@ -381,7 +382,15 @@ type LivingVillageGame() as this = match flowStep with | 0 -> printfn "flow=main-menu" - this.DispatchMenuInput Confirm + flowStep <- 50 + | 50 when menu.Page = MainMenu -> + flowHold <- flowHold + 1 + if flowHold >= 60 then + flowHold <- 0 + this.DispatchMenuInput Confirm + printfn "flow=new-game" + flowStep <- 1 + | 50 -> printfn "flow=new-game" flowStep <- 1 | 1 when menu.Page = Playing -> @@ -401,6 +410,13 @@ type LivingVillageGame() as this = moveDown 4 this.DispatchMenuInput Confirm printfn "flow=controls=open" + flowStep <- 30 + | 30 -> + flowHold <- flowHold + 1 + if flowHold >= 60 || menu.Page <> Controls then + flowHold <- 0 + flowStep <- 31 + | 31 -> this.DispatchMenuInput Back printfn "flow=controls=back" flowStep <- 4 |
