From 9821b54ff2a77539898b62471d79dc4685b59cad Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Tue, 22 Sep 2026 16:33:03 +0800 Subject: feat(kernel,desktop): P31 step3 story annals + identity entry + glyph atlas - Sim.AnnalKind gains StoryAnnal (summary lives in the existing Summary field); WorldSave v3 serializes it with the new 'story' token. v1/v2 saves never contain the token and stay byte-identical; v3 save -> load -> save roundtrips byte-for-byte (tested). - Occupation.Story.identitySummaryOf: plain chronicle-style identity line written to the yearbook at game start (design section 3), e.g. yi-da-yu-wei-sheng. - Desktop: story summaries render in the chronicle panel; StartNewGame appends the identity annal; chooseIntent now routes responses through Occupation.biasResponse and advances the storyline (one stage per player dialogue) with the summary appended as a StoryAnnal. - M5View gains Seed (world seed source for the story start-day hash). - Chinese copy synced into requiredUiLabels; cjk-glyphs.txt + CjkGlyphAtlas.characterTable extended 238 -> 307 glyphs (384x480), atlas regenerated with the deterministic script. - 4 new kernel tests (115 -> 119); performance digest unchanged. --- src/LivingVillage.Kernel/Occupation.fs | 36 +++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to 'src/LivingVillage.Kernel/Occupation.fs') diff --git a/src/LivingVillage.Kernel/Occupation.fs b/src/LivingVillage.Kernel/Occupation.fs index 00cd2e9..c207395 100644 --- a/src/LivingVillage.Kernel/Occupation.fs +++ b/src/LivingVillage.Kernel/Occupation.fs @@ -343,18 +343,26 @@ module Occupation = let endingTextOf (kind: Kind) (ending: Ending) : string = match kind, ending with - | Farmer, Warm -> "雨水与年成有了结果:乡邻都说雨水匀,今年差不了。" - | Farmer, Plain -> "雨水与年成有了结果:雨水尚可,年成将就,照旧耕作。" - | Farmer, Distant -> "雨水与年成有了结果:问不出准信,年成只能看天。" - | Fisher, Warm -> "水位与收成有了结果:乡邻说得真切,水位稳了,收成坏不了。" - | Fisher, Plain -> "水位与收成有了结果:众说平常,水位尚可,收成将就。" - | Fisher, Distant -> "水位与收成有了结果:问了几家都淡淡的,水情还得自己看。" - | Peddler, Warm -> "新货的路子有了结果:乡邻热心指路,新货不愁卖。" - | Peddler, Plain -> "新货的路子有了结果:说法平常,先小量试卖。" - | Peddler, Distant -> "新货的路子有了结果:各家都淡淡的,路子还得自己闯。" - | Scholar, Warm -> "庙前的争论有了结果:各说各理,事有分晓。" - | Scholar, Plain -> "庙前的争论有了结果:众说纷纭,暂无定论。" - | Scholar, Distant -> "庙前的争论有了结果:无人理会,先记在册上。" + | Farmer, Warm -> "雨水与年成有了结果:乡邻都说雨水匀,今年差不了" + | Farmer, Plain -> "雨水与年成有了结果:雨水尚可,年成将就,照旧耕作" + | Farmer, Distant -> "雨水与年成有了结果:问不出准信,年成只能看天" + | Fisher, Warm -> "水位与收成有了结果:乡邻说得真切,水位稳了,收成坏不了" + | Fisher, Plain -> "水位与收成有了结果:众说平常,水位尚可,收成将就" + | Fisher, Distant -> "水位与收成有了结果:问了几家都淡淡的,水情还得自己看" + | Peddler, Warm -> "新货的路子有了结果:乡邻热心指路,新货不愁卖" + | Peddler, Plain -> "新货的路子有了结果:说法平常,先小量试卖" + | Peddler, Distant -> "新货的路子有了结果:各家都淡淡的,路子还得自己闯" + | Scholar, Warm -> "庙前的争论有了结果:各说各理,事有分晓" + | Scholar, Plain -> "庙前的争论有了结果:众说纷纭,暂无定论" + | Scholar, Distant -> "庙前的争论有了结果:无人理会,先记在册上" + + /// §3 身份条目:开局写入年鉴(如「以打渔为生」),不带主语、沿年鉴短句风格。 + let identitySummaryOf (kind: Kind) : string = + match kind with + | Farmer -> "以耕田为生" + | Fisher -> "以打渔为生" + | Peddler -> "以贩货为生" + | Scholar -> "以读书为生" /// 用一次玩家对话推进剧情线:同输入两次结果一致。 /// 返回(新状态, 应写入年鉴的摘要文本 option);无门控命中时原样返回。 @@ -366,10 +374,10 @@ module Occupation = match state.StoryStage with | 0 when day >= startDay -> { state with StoryStage = 1 }, - Some (sprintf "接了件事:%s,得去村里多问问。" (lineNameOf kind)) + Some (sprintf "接了件事:%s,得去村里多问问" (lineNameOf kind)) | 1 when day >= startDay + 1L -> { state with StoryStage = 2 }, - Some "走访了几户人家,改日再问。" + Some "走访了几户人家,改日再问" | 2 when day >= startDay + 2L -> let ending = endingOf (relationMeanToPlayer world) { state with StoryStage = 3 }, -- cgit v1.2.3