fixed detour stacking and improper option gating
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
// Everything that can be interacted with the chair.
|
||||
//
|
||||
// These nodes share a title, which makes them a node group. Callers just
|
||||
// `<<detour Chair_Interaction>>` and Yarn runs the most specific variation whose
|
||||
// `when:` conditions pass. Adding a new variation later means adding a node,
|
||||
// not editing a growing <<if>> chain.
|
||||
// Stack discipline (the player re-enters all of this, so it matters):
|
||||
// `Chair_Interaction` is the node DialogueInteractable starts, so nothing above
|
||||
// it is waiting for a return. The menu therefore LOOPS with <<jump>>, which
|
||||
// replaces the current node and pushes nothing, and only sub-conversations that
|
||||
// have to come back use <<detour>>. Never <<jump>> out of a detoured node —
|
||||
// that clears the return stack and the caller never resumes.
|
||||
//
|
||||
// Each variation sets $went_inside so the calling scene knows the verdict.
|
||||
// The sit-down line lives in its own node so the menu loop can't replay it,
|
||||
// while a player who stands up and sits down again still gets it.
|
||||
|
||||
title: Chair_Interaction
|
||||
position: -334,-601
|
||||
@@ -13,7 +16,7 @@ position: -334,-601
|
||||
Narrator: An empty chair with a place card: {$player_name}.
|
||||
-> Sit down.
|
||||
<<set $sat_down_at_table = true>>
|
||||
<<detour SC101_Hook_Sitting_Chair_Interaction>>
|
||||
<<jump SC101_Hook_Sitting_Chair_Interaction>>
|
||||
-> Not yet.
|
||||
<<enter_environment>>
|
||||
===
|
||||
@@ -22,21 +25,22 @@ title: SC101_Hook_Sitting_Chair_Interaction
|
||||
position: -328,-360
|
||||
---
|
||||
Narrator: You sit down between two very distinguished gentlemen.
|
||||
<<jump SC101_Hook_Menu_Chair_Interaction>>
|
||||
===
|
||||
|
||||
// The loop target. Every menu variation jumps back here when its sub-conversation
|
||||
// returns, so which variation shows is re-evaluated after every interaction.
|
||||
title: SC101_Hook_Menu_Chair_Interaction
|
||||
position: -328,-205
|
||||
---
|
||||
<<if $spoke_to_chevalier_cassian_thal eq true and $spoke_to_bradford_kane eq true>>
|
||||
<<detour SC101_Hook_Both_Chair_Interaction>>
|
||||
<<detour SC101_Hook_Sitting_Chair_Interaction>>
|
||||
<<jump SC101_Hook_Both_Chair_Interaction>>
|
||||
<<elseif $spoke_to_chevalier_cassian_thal eq true and $spoke_to_bradford_kane eq false>>
|
||||
<<detour SC101_Hook_Left_Not_Right_Chair_Interaction>>
|
||||
<<detour SC101_Hook_Sitting_Chair_Interaction>>
|
||||
<<jump SC101_Hook_Left_Not_Right_Chair_Interaction>>
|
||||
<<elseif $spoke_to_chevalier_cassian_thal eq false and $spoke_to_bradford_kane eq true>>
|
||||
<<detour SC101_Hook_Right_Not_Left_Chair_Interaction>>
|
||||
<<detour SC101_Hook_Sitting_Chair_Interaction>>
|
||||
<<elseif $spoke_to_chevalier_cassian_thal eq true and $spoke_to_bradford_kane eq true>>
|
||||
<<detour SC101_Hook_Both_Chair_Interaction>>
|
||||
<<detour SC101_Hook_Sitting_Chair_Interaction>>
|
||||
<<jump SC101_Hook_Right_Not_Left_Chair_Interaction>>
|
||||
<<else>>
|
||||
<<detour SC101_Hook_First_Sitting_Chair_Interaction>>
|
||||
<<detour SC101_Hook_Sitting_Chair_Interaction>>
|
||||
<<jump SC101_Hook_First_Sitting_Chair_Interaction>>
|
||||
<<endif>>
|
||||
===
|
||||
|
||||
@@ -51,6 +55,8 @@ position: -320,-51
|
||||
<<detour Bradford_Kane_Talk>>
|
||||
-> Stand up.
|
||||
<<enter_environment>>
|
||||
<<stop>>
|
||||
<<jump SC101_Hook_Menu_Chair_Interaction>>
|
||||
===
|
||||
|
||||
title: SC101_Hook_Left_Not_Right_Chair_Interaction
|
||||
@@ -64,6 +70,8 @@ position: -95,-48
|
||||
<<detour Bradford_Kane_Talk>>
|
||||
-> Stand up.
|
||||
<<enter_environment>>
|
||||
<<stop>>
|
||||
<<jump SC101_Hook_Menu_Chair_Interaction>>
|
||||
===
|
||||
|
||||
title: SC101_Hook_Right_Not_Left_Chair_Interaction
|
||||
@@ -77,6 +85,8 @@ position: 134,-32
|
||||
<<detour Bradford_Kane_Talk>>
|
||||
-> Stand up.
|
||||
<<enter_environment>>
|
||||
<<stop>>
|
||||
<<jump SC101_Hook_Menu_Chair_Interaction>>
|
||||
===
|
||||
|
||||
title: SC101_Hook_Both_Chair_Interaction
|
||||
@@ -90,6 +100,8 @@ position: 363,-36
|
||||
<<detour Bradford_Kane_Talk>>
|
||||
-> Stand up.
|
||||
<<enter_environment>>
|
||||
<<stop>>
|
||||
<<jump SC101_Hook_Menu_Chair_Interaction>>
|
||||
===
|
||||
|
||||
title: SC101_Hook_Place_Card_Chair_Interaction
|
||||
|
||||
Reference in New Issue
Block a user