From 98b6b21c56c7b061578e7d4b56d52450dc7bd575 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Mon, 21 Sep 2026 19:34:32 +0800 Subject: feat(desktop): P12 中文每日任务面板——T 键任务页、Offered/Active/Done 三态+职业名,存读档字段级携带职业 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/LivingVillage.Desktop/Game.fs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/LivingVillage.Desktop/Game.fs') diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs index 9fab5f7..cbe2b9d 100644 --- a/src/LivingVillage.Desktop/Game.fs +++ b/src/LivingVillage.Desktop/Game.fs @@ -202,7 +202,7 @@ type LivingVillageGame() as this = member private this.SaveWorld (prefix: string) : bool = try - WorldSave.saveToFile savePath world + WorldSave.saveToFileWith m5View.Task savePath world m5View <- { m5View with Status = "save succeeded"; StatusTick = Some world.Tick } printfn $"{prefix}=ok path={savePath} tick={world.Tick}" true @@ -213,10 +213,11 @@ type LivingVillageGame() as this = false member private this.LoadWorld (prefix: string) : Result = - match WorldSave.loadFromFile savePath with - | Ok nextWorld -> + match WorldSave.loadFromFileWith savePath with + | Ok (nextWorld, occupation) -> world <- nextWorld this.ResetWorldView() + m5View <- { m5View with Task = occupation } printfn $"{prefix}=ok path={savePath} tick={world.Tick}" Ok world.Tick | Error failure -> @@ -384,6 +385,7 @@ type LivingVillageGame() as this = elif pressed Keys.Q then Some Observe elif pressed Keys.Tab then Some ToggleNeeds elif pressed Keys.C then Some ShowChronicle + elif pressed Keys.T then Some ShowTaskPanel else None match m5Command with | Some command -> -- cgit v1.2.3