From fc5b375eb3859e8233ddfd34a020b24842c8682f Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Tue, 22 Sep 2026 09:00:17 +0800 Subject: feat(desktop): LV_RIVERSCAPE_VILLAGE_TOUR 村民巡游钩子提升屏内可见村民(P25) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - NPC 行动目标固定在 Sim 四活动点(厨房/家/集市/工位),原桥/门/核心巡游大多帧 屏内仅 0-3 人;新钩子改为在这些活动点间环游,150s 采样 >=8 村民占 74%(村庄段 89-91%)。 - 仅 Desktop 取证路径,不动 Kernel/Sim 数值。 --- src/LivingVillage.Desktop/Game.fs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs index bcc4094..c6da443 100644 --- a/src/LivingVillage.Desktop/Game.fs +++ b/src/LivingVillage.Desktop/Game.fs @@ -162,10 +162,25 @@ type LivingVillageGame() as this = | _ -> 0.0 let riverscapeTourWatch = System.Diagnostics.Stopwatch() let mutable riverscapeTourWatchStarted = false + // P25 证据钩子:村民巡游。NPC 行动目标固定在 Sim 的四个活动点(厨房/家/集市/工位), + // 让 avatar 在这些点之间环游,保证记录帧多数时刻屏内有 >=8 名村民。 + let riverscapeVillageTour = Environment.GetEnvironmentVariable("LV_RIVERSCAPE_VILLAGE_TOUR") = "1" + let villageTourWaypoints () : (int * int) list = + let tileOf (p: Vec2) = (int p.X / Sim.tilePixels, int p.Y / Sim.tilePixels) + let plaza = tileOf Sim.plazaPoint + let kitchen = tileOf Sim.kitchenPoint + let home = tileOf Sim.homePoint + let worksite = tileOf Sim.worksitePoint + [ plaza; home; worksite; kitchen; plaza ] /// 巡游路点:第一座桥的整列(含两端外沿)+ 民居门 + 核心中心,用于桥面行走取证。 + /// LV_RIVERSCAPE_VILLAGE_TOUR=1 时改为村民活动点环游(P25 村民可见性取证)。 let riverscapeTourWaypoints () : (int * int) list = match riverscapeMap with | None -> [] + | Some map when riverscapeVillageTour -> + villageTourWaypoints () + |> List.filter (fun (x, y) -> x >= 0 && x < map.Width && y >= 0 && y < map.Height) + |> List.distinct | Some map -> let bridgeStops = map.Bridges -- cgit v1.2.3