summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop/Game.fs
diff options
context:
space:
mode:
Diffstat (limited to 'src/LivingVillage.Desktop/Game.fs')
-rw-r--r--src/LivingVillage.Desktop/Game.fs17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs
index 862e1de..a0e6fc0 100644
--- a/src/LivingVillage.Desktop/Game.fs
+++ b/src/LivingVillage.Desktop/Game.fs
@@ -551,12 +551,17 @@ type LivingVillageGame() as this =
member private this.StartNewGame (occupation: Occupation.Kind option) =
let startTick = evidenceStartTick ()
- let state =
+ let baseState =
occupation
|> Option.map (fun kind -> WorldBootstrap.occupationStateFor 42UL kind startTick)
world <-
- initialWorldForMode state
+ initialWorldForMode baseState
|> withStartTick
+ // P66:用真实世界的可达候选集合给当日任务定点(世界只依赖 profile,故只需建一次)。
+ let state =
+ match occupation with
+ | Some kind -> Some(WorldBootstrap.occupationStateForWorld 42UL kind startTick world)
+ | None -> None
// §3 身份条目:带职业开局即写入年鉴,形成个人传记线
match state with
| Some occupationState ->
@@ -1665,7 +1670,7 @@ type LivingVillageGame() as this =
setDay3Noon ()
// 用真实跨日刷新把当日任务推进到第 3 日(seed 42/农夫 = 送粮)。
match m5View.Task with
- | Some state -> m5View <- { m5View with Task = Some(WorldBootstrap.refreshOccupationToday 42UL state world.Tick) }
+ | Some state -> m5View <- { m5View with Task = Some(WorldBootstrap.refreshOccupationTodayWorld 42UL state world.Tick world) }
| None -> ()
let npc = world.Npcs.[0]
world <- { world with Avatar = { world.Avatar with Pos = npc.Pos } }
@@ -2013,7 +2018,7 @@ type LivingVillageGame() as this =
this.CenterCamera()
match m5View.Task with
| Some state ->
- let refreshed = WorldBootstrap.refreshOccupationToday 42UL state world.Tick
+ let refreshed = WorldBootstrap.refreshOccupationTodayWorld 42UL state world.Tick world
if refreshed <> state then
m5View <- { m5View with Task = Some refreshed }
| None -> ()
@@ -2120,13 +2125,15 @@ type LivingVillageGame() as this =
let startTick = lineStartDay * Sim.ticksPerDay + 12L * Sim.ticksPerDay / 24L
let state = WorldBootstrap.occupationStateFor seed kind startTick
let world0 = WorldBootstrap.initialWorldWithOccupation false seed Sim.npcCount (Some state)
+ // P66:证据路径同样按真实世界候选定点当日任务(world0 只依赖 profile)。
+ let task0 = WorldBootstrap.occupationStateForWorld seed kind startTick world0
let world1 = { world0 with Tick = startTick; Time = float startTick * Sim.dtSeconds }
let world2 =
Sim.appendAnnal
{ Tick = startTick; Kind = StoryAnnal; Summary = Occupation.Story.identitySummaryOf kind }
world1
let mutable w = world2
- let mutable task = state
+ let mutable task = task0
for i in 0 .. stage - 1 do
let npc = w.Npcs.[i % w.Npcs.Length]
let wNear = { w with Avatar = { w.Avatar with Pos = npc.Pos } }