From f819d25e278257229dc39e0067c042c1003fffbe Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Tue, 22 Sep 2026 04:39:01 +0800 Subject: feat(desktop): LV_RIVERSCAPE_WIDTH/HEIGHT 取证钩子支持 512x384 生成器世界(P23) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 默认仍是 256x192,不改默认世界;仅让巡游/性能取证可跑 512x384。 --- src/LivingVillage.Desktop/Game.fs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs index 4305cb6..8309867 100644 --- a/src/LivingVillage.Desktop/Game.fs +++ b/src/LivingVillage.Desktop/Game.fs @@ -136,10 +136,19 @@ type LivingVillageGame() as this = // 证据用 sample 流程(LV_AUTOPLAY_SAMPLE)保持旧 64x48 以确保既有录像可复现,除非显式请求巡游。 let riverscapeTourRequested = Environment.GetEnvironmentVariable("LV_RIVERSCAPE_TOUR") = "1" let riverscapeActive = not legacyMapMode && not mapTourMode && mapScale <= 1 && (not sampleMode || riverscapeTourRequested) + // P23 取证钩子:可把生成器世界扩到 512x384(默认仍是 256x192,不改默认值)。 + let riverscapeWidth = + match Environment.GetEnvironmentVariable("LV_RIVERSCAPE_WIDTH") with + | null | "" -> 256 + | v -> match Int32.TryParse v with (true, value) when value > 0 -> value | _ -> 256 + let riverscapeHeight = + match Environment.GetEnvironmentVariable("LV_RIVERSCAPE_HEIGHT") with + | null | "" -> 192 + | v -> match Int32.TryParse v with (true, value) when value > 0 -> value | _ -> 192 let riverscapeMap : MapGen.Result option = if riverscapeActive then - Sim.configureBounds 256 192 - Some (MapGen.generateWithSize 256 192 42UL) + Sim.configureBounds riverscapeWidth riverscapeHeight + Some (MapGen.generateWithSize riverscapeWidth riverscapeHeight 42UL) else None let riverscapeTourMode = riverscapeTourRequested && riverscapeActive -- cgit v1.2.3