diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-22 09:00:17 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-22 09:00:17 +0800 |
| commit | fc5b375eb3859e8233ddfd34a020b24842c8682f (patch) | |
| tree | b9a16449524fb960885da9ee897d676c056eceff | |
| parent | 91b7204d45f4f11d9cd75afcfbea9bd7034a3de4 (diff) | |
| download | living-village-fc5b375eb3859e8233ddfd34a020b24842c8682f.tar.gz | |
feat(desktop): LV_RIVERSCAPE_VILLAGE_TOUR 村民巡游钩子提升屏内可见村民(P25)
- NPC 行动目标固定在 Sim 四活动点(厨房/家/集市/工位),原桥/门/核心巡游大多帧
屏内仅 0-3 人;新钩子改为在这些活动点间环游,150s 采样 >=8 村民占 74%(村庄段 89-91%)。
- 仅 Desktop 取证路径,不动 Kernel/Sim 数值。
| -rw-r--r-- | src/LivingVillage.Desktop/Game.fs | 15 |
1 files changed, 15 insertions, 0 deletions
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 |
