summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop/Game.fs
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-22 04:39:01 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-22 04:39:01 +0800
commitf819d25e278257229dc39e0067c042c1003fffbe (patch)
treee97d62c0514f50b60778d05998caed9eb086a8dc /src/LivingVillage.Desktop/Game.fs
parent1724ce6b659850907d3bf5dc4daff70137804cf2 (diff)
downloadliving-village-f819d25e278257229dc39e0067c042c1003fffbe.tar.gz
feat(desktop): LV_RIVERSCAPE_WIDTH/HEIGHT 取证钩子支持 512x384 生成器世界(P23)
- 默认仍是 256x192,不改默认世界;仅让巡游/性能取证可跑 512x384。
Diffstat (limited to 'src/LivingVillage.Desktop/Game.fs')
-rw-r--r--src/LivingVillage.Desktop/Game.fs13
1 files 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