diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-21 10:12:20 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-21 10:12:20 +0800 |
| commit | 9df2da41289f4d0852f86e86eae81ca7f7e7b598 (patch) | |
| tree | bca1a071e3369a9e2ebbf5e424da3dd45547f2be /src/LivingVillage.Desktop/SampleScript.fs | |
| parent | c932969539b00a42937f0aa5ed1e10b4e94932a3 (diff) | |
| download | living-village-9df2da41289f4d0852f86e86eae81ca7f7e7b598.tar.gz | |
fix(desktop): 修复 HUD 缺字并统一轻量面板与情境提示
字符表扩充至 197 字(补 间/门/谈/体/屋/返/×/,/:等全部 UI 用字),用 Noto Sans CJK 重新生成图集并逐字校验;新增字符表覆盖全部 UI 文案、瞬态状态 2.5 秒过期、对话完成后回到轻量面板等回归测试;户外与室内统一左下角轻量 HUD,互动日志改为短暂反馈;样例脚本保留 E 交谈 提示与对话菜单停留帧。
Diffstat (limited to 'src/LivingVillage.Desktop/SampleScript.fs')
| -rw-r--r-- | src/LivingVillage.Desktop/SampleScript.fs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/LivingVillage.Desktop/SampleScript.fs b/src/LivingVillage.Desktop/SampleScript.fs index c072161..0f3519e 100644 --- a/src/LivingVillage.Desktop/SampleScript.fs +++ b/src/LivingVillage.Desktop/SampleScript.fs @@ -52,6 +52,8 @@ module SampleScript = let private arriveRadius = 12.0f let private inspectFrames = 150 + let private promptHoldFrames = 60 + let private menuHoldFrames = 60 let private dialogueHoldFrames = 120 let private totalFrameLimit = 20000 @@ -66,7 +68,7 @@ module SampleScript = | InspectInterior -> 600 | LeaveDoorstep -> 1800 | ApproachNpc -> 5400 - | ReadDialogueOptions -> 120 + | ReadDialogueOptions -> 600 | CloseDialogue -> 300 | WalkAway -> 3600 | SampleComplete -> Int32.MaxValue @@ -120,14 +122,20 @@ module SampleScript = | ApproachNpc -> match M5Interaction.resolveAction world Outside with | Some { Action = TalkTo target } -> - { advance ReadDialogueOptions state with DialogueTarget = Some target }, PushM5 Interact + if state.StageFrames >= promptHoldFrames then + { advance ReadDialogueOptions state with DialogueTarget = Some target }, PushM5 Interact + else + state, NoAction | _ -> match nearestChatableNpc world with | Some npc -> state, MoveTo npc.Pos | None -> state, NoAction | ReadDialogueOptions -> if view.Panel = DialoguePanel && view.Menu.IsSome then - state, PushM5 Intent1 + if state.StageFrames >= menuHoldFrames then + state, PushM5 Intent1 + else + state, NoAction else advance CloseDialogue state, NoAction | CloseDialogue -> |
