diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-21 19:34:32 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-21 19:34:32 +0800 |
| commit | 98b6b21c56c7b061578e7d4b56d52450dc7bd575 (patch) | |
| tree | 8c3ce5912294207d37863c37b15f2bce89c0787f /src/LivingVillage.Desktop/Game.fs | |
| parent | c348da258f072bc88ea422cbc534c0831817b3c8 (diff) | |
| download | living-village-98b6b21c56c7b061578e7d4b56d52450dc7bd575.tar.gz | |
feat(desktop): P12 中文每日任务面板——T 键任务页、Offered/Active/Done 三态+职业名,存读档字段级携带职业
Diffstat (limited to 'src/LivingVillage.Desktop/Game.fs')
| -rw-r--r-- | src/LivingVillage.Desktop/Game.fs | 8 |
1 files changed, 5 insertions, 3 deletions
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<int64, string> = - 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 -> |
