diff options
Diffstat (limited to 'src/LivingVillage.Desktop/Game.fs')
| -rw-r--r-- | src/LivingVillage.Desktop/Game.fs | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs index b51c7f0..cdfc06b 100644 --- a/src/LivingVillage.Desktop/Game.fs +++ b/src/LivingVillage.Desktop/Game.fs @@ -318,6 +318,12 @@ type LivingVillageGame() as this = let mutable p44Step = 0 let mutable p44PendingName = "" let mutable p44Pending = false + // P61 证据钩子(G1 字形补齐):拍「右上日历(春夏秋冬·第N天)/ 对话页脚(第N/3页 + V 卖出 背包物品×1)」 + // 两帧,证明新补 16 字在真实游戏 UI 中完整可辨。 + let p61ShotMode = Environment.GetEnvironmentVariable("LV_P61_SHOT") = "1" + let mutable p61Step = 0 + let mutable p61PendingName = "" + let mutable p61Pending = false // P45 证据钩子:LV_P45_SHOT=1 时拍角色 idle / 行走朝下 / 行走朝右 三帧(真实游戏截图)。 let p45ShotMode = Environment.GetEnvironmentVariable("LV_P45_SHOT") = "1" let mutable p45Step = 0 @@ -961,6 +967,43 @@ type LivingVillageGame() as this = (m5View.Prompt |> Option.defaultValue "<none>") p44Step <- p44Step + 1 + /// P61 证据(G1):真实世界里拍「右上日历」与「对话页脚/背包文案」两帧。 + member private this.PrepareP61Shot () = + let setHour (hour: float) = + let tick = M6Presentation.resolveStartTick (Some hour) false + world <- { world with Tick = tick; Time = float tick * Sim.dtSeconds } + if not p61Pending then + match p61Step with + | 0 -> + setHour 12.0 + let npc = world.Npcs.[0] + world <- { world with Avatar = { world.Avatar with Pos = npc.Pos } } + this.CenterCamera() + p61PendingName <- "p61-calendar" + p61Pending <- true + | 1 -> + let nextWorld, nextView = M5Interaction.apply M5Command.Interact world m5View + world <- nextWorld + m5View <- nextView + this.CenterCamera() + p61PendingName <- "p61-dialog-footer" + p61Pending <- true + | _ -> + printfn "p61-shot=done" + this.Exit() + + /// P61 证据:落盘并打印日历读数(春夏秋冬·第N天)与面板名,供 analyze 核验。 + member private this.CaptureP61Shot () = + if p61Pending then + p61Pending <- false + System.IO.Directory.CreateDirectory recordDirectory |> ignore + this.SaveBackBuffer(sprintf "%s/%s.png" recordDirectory p61PendingName) + let reading = HudLayout.calendarReading world.Tick + printfn + "p61-shot=%s tick=%d calendar=%s panel=%s" + p61PendingName world.Tick (HudLayout.calendarLine1 reading) (M5Interaction.panelName m5View) + p61Step <- p61Step + 1 + member private this.PrepareP45Shot () = let baseTick = M6Presentation.resolveStartTick (Some 12.0) false let setTick (tick: int64) = @@ -1942,6 +1985,14 @@ type LivingVillageGame() as this = else this.DispatchMenuInput Confirm elif menu.Page = Playing then this.PrepareP44Shot() + elif p61ShotMode then + if menu.Page = MainMenu then + this.DispatchMenuInput Confirm + elif menu.Page = OccupationSelect then + if menu.Selected <> 0 then this.DispatchMenuInput Down + else this.DispatchMenuInput Confirm + elif menu.Page = Playing then + this.PrepareP61Shot() elif p45ShotMode then if menu.Page = MainMenu then this.DispatchMenuInput Confirm @@ -2412,6 +2463,8 @@ type LivingVillageGame() as this = this.CaptureP43Shot() if p44ShotMode && menu.Page = Playing then this.CaptureP44Shot() + if p61ShotMode && menu.Page = Playing then + this.CaptureP61Shot() if p45ShotMode && menu.Page = Playing then this.CaptureP45Shot() if p46ShotMode then |
