From 3b53dc1f6f42901dfce720b11b7d089a64ba7e1f Mon Sep 17 00:00:00 2001 From: Map Date: Thu, 3 Oct 2024 10:09:29 -0500 Subject: [PATCH] Move story var resetting so that it runs everytime the user enters the ending selection menu. Fix list copying to work as intended --- game/src/chapter_select.rpy | 25 ++++++++++++++----------- game/src/chapter_variables.rpy | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/game/src/chapter_select.rpy b/game/src/chapter_select.rpy index 57ca071..3ab20a9 100644 --- a/game/src/chapter_select.rpy +++ b/game/src/chapter_select.rpy @@ -42,17 +42,7 @@ define ending_4_tuple = [ label chapter_select: - python: - quick_menu = False # Hides bottom quick menu UI - - # 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() + $ quick_menu = False # Hides bottom quick menu UI camera: yanchor 0.0 xanchor 0.0 rotate None zoom 1.0 @@ -73,6 +63,19 @@ label chapter_select: label chapter_select_go_back: + # Reset story vars. Not that it terribly matters, but just in case it avoids bugs. + python: + anonscore = 0 + fangscore = 0 + wingStory = False + + chapter_list = base_chapter_list.copy() + chapter_list_index = 0 + chapter_list_length = get_chapter_list_length() + ending_route_number = None + ending_chapters_determined = False + current_chapter = chapter_list[chapter_list_index] + menu: "What ending do you want to lock to?" diff --git a/game/src/chapter_variables.rpy b/game/src/chapter_variables.rpy index a187655..2626c70 100644 --- a/game/src/chapter_variables.rpy +++ b/game/src/chapter_variables.rpy @@ -12,7 +12,7 @@ define ending_routes = { } # The working list the game references to determine the chapters to use. Ending chapters are added to this list when determined. -default chapter_list = base_chapter_list +default chapter_list = base_chapter_list.copy() # Default vars reset when a new game starts, so no biggie.