From 8fad58bd62155da653251ab7457cd54ebba0b279 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Tue, 22 Sep 2026 00:50:30 +0800 Subject: test(desktop): P17 取证钩子(LV_AUTOPLAY_START_HOUR 纯函数起时)+ 证据与 docs 记录 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/LivingVillage.Desktop/Game.fs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/LivingVillage.Desktop/Game.fs') diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs index 3f3a1d8..4760d4e 100644 --- a/src/LivingVillage.Desktop/Game.fs +++ b/src/LivingVillage.Desktop/Game.fs @@ -126,8 +126,21 @@ type LivingVillageGame() as this = let mutable cjkAtlas = Unchecked.defaultof let mutable pixel = Unchecked.defaultof let renderPlan = VillageArt.sampleRenderPlan () + // Evidence hook: pin the starting wall-clock hour (e.g. 20.75 for 黄昏), desktop-only. + let startHourOverride = + match Environment.GetEnvironmentVariable("LV_AUTOPLAY_START_HOUR") with + | null | "" -> None + | value -> + match Double.TryParse(value, Globalization.NumberStyles.Float, Globalization.CultureInfo.InvariantCulture) with + | true, hour -> Some hour + | _ -> None let createInitialWorld () = - WorldBootstrap.initialWorldForDaylight daylightAutoplay 42UL Sim.npcCount + let baseWorld = WorldBootstrap.initialWorldForDaylight daylightAutoplay 42UL Sim.npcCount + match startHourOverride with + | Some hour -> + let tick = M6Presentation.startTickForHour hour + { baseWorld with Tick = tick; Time = float tick * Sim.dtSeconds } + | None -> baseWorld let mutable world = createInitialWorld () let mutable camera = Vector2.Zero let mutable avatarFacing = VillageArt.SouthFacing -- cgit v1.2.3