From c8b5c68649baccfb17938a1f7ab1ec3286c01897 Mon Sep 17 00:00:00 2001 From: Map Date: Thu, 3 Oct 2024 07:21:59 -0500 Subject: [PATCH] Reset story vars when chapter select initializes --- game/src/chapter_select.rpy | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/game/src/chapter_select.rpy b/game/src/chapter_select.rpy index 39cd26d..57ca071 100644 --- a/game/src/chapter_select.rpy +++ b/game/src/chapter_select.rpy @@ -42,10 +42,17 @@ define ending_4_tuple = [ label chapter_select: - $ quick_menu = False # Hides bottom quick menu UI + python: + quick_menu = False # Hides bottom quick menu UI - $ anonscore = 0 - $ fangscore = 0 + # Reset story vars. Not that it terribly matters. + anonscore = 0 + fangscore = 0 + wingStory = False + + chapter_list = base_chapter_list + chapter_list_index = 0 + chapter_list_length = get_chapter_list_length() camera: yanchor 0.0 xanchor 0.0 rotate None zoom 1.0 @@ -83,14 +90,14 @@ label chapter_select_go_back: window auto hide - $ select_chapter() + $ chapter_select() init python: # Some of this would be much easier to do if we could just reorganize how the chapters are laid out, but breaking translations is way more of a hassle to fix - def select_chapter(): + def chapter_select(): global current_chapter, quick_menu, ending_route_number, chapter_list_index, chapter_list, ending_chapters_determined, chapter_list_length selected_label = display_chapter_choices() # Returns a label of the chapter to jump to