summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop/SampleScript.fs
diff options
context:
space:
mode:
Diffstat (limited to 'src/LivingVillage.Desktop/SampleScript.fs')
-rw-r--r--src/LivingVillage.Desktop/SampleScript.fs14
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 ->