-
Notifications
You must be signed in to change notification settings - Fork 0
shop_flow
mzki edited this page Jul 15, 2019
·
1 revision
graph TB
%% -- Common Template --
%% nodes
start(("Start"))
next_scene_from_common(("Next scene"))
scene_start_common["goto: scene_start_common()"]
%% styles
classDef class_script_call fill:#CAF
classDef class_routine_call fill:#EE9
%% apply styles
class scene_start_common class_routine_call
%% flow
start --> scene_start_common
scene_start_common --> |next scene| next_scene_from_common
%% -- scene specific --
%% nodes
next_scene(("Next scene"))
prev_scene(("Previous scene"))
next_scene_exist{"next scene?"}
shop_replace_show_menu("script: shop_replace_show_menu()")
shop_replace_show_menu_exist{"shop_replace_show_menu()?"}
shop_replace_show_menu_used{"shop_replace_show_menu()?"}
builtin_print_item_menu["print item menu"]
user_input_number("wait: user input number")
shop_user_menu_selected("script: handled = shop_user_menu_selected(input_number)")
menu_handled{"return value?"}
user_input_number_is{"user input number"}
%% apply styles
class shop_replace_show_menu,shop_user_menu_selected class_script_call
%% flows
scene_start_common --> |continue current scene| next_scene_exist
next_scene_exist --> |exist| next_scene
next_scene_exist --> |NOT exist| shop_replace_show_menu_exist
shop_replace_show_menu_exist --> |exist| shop_replace_show_menu
shop_replace_show_menu_exist --> |NOT exist| builtin_print_item_menu
shop_replace_show_menu --> user_input_number
builtin_print_item_menu -->
user_input_number
user_input_number --> shop_user_menu_selected
shop_user_menu_selected --> menu_handled
menu_handled --> |true| next_scene_exist
menu_handled --> |false| shop_replace_show_menu_used
shop_replace_show_menu_used --> |used| user_input_number
shop_replace_show_menu_used --> |NOT used| user_input_number_is
user_input_number_is --> |"[-1] Back"| prev_scene
user_input_number_is --> |others| user_input_number