chapter_select improvements

This commit is contained in:
Iggy 2024-08-30 20:03:19 -03:00
parent e0027f3c5d
commit b1cc24fb2e

View file

@ -65,13 +65,13 @@ init python:
renpy.jump("chapter_select")
current_chapter = display_tuple_menu(selected_tuple)
find_chapter_in_array()
if current_chapter == "go_back":
continue
else:
find_chapter_in_array(current_chapter)
break
set_stats()
toggle_debug()
quick_menu = True # Restores the bottom quick menu UI
@ -97,10 +97,6 @@ init python:
return renpy.display_menu(options + [("Go Back", "go_back")])
def set_stats():
update_ending_variables() # Updates variables for newly extended 'chapter_list' with ending chapters
def set_scores(anon_score, fang_score):
global anonscore, fangscore
@ -108,14 +104,14 @@ init python:
fangscore = fang_score
def find_chapter_in_array():
global chapter_list_index, current_chapter
def find_chapter_in_array(chapter):
global chapter_list_index
try:
chapter_list_index = chapter_list.index(current_chapter)
chapter_list_index = chapter_list.index(chapter)
except ValueError:
chapter_list_index = -1
current_chapter = "hola"
chapter = ""
label reset_chapter_list:
@ -134,7 +130,7 @@ label reset_chapter_list:
label chapter_select:
$ quick_menu = False # Hides bottom quick menu UI
call reset_chapter_list from _call_reset_chapter_list
call reset_chapter_list from _call_reset_chapter_list # Reset every time the tool is called
$ anon_points = 0
$ fang_points = 0
@ -157,6 +153,7 @@ label chapter_select:
"Ending 4":
$ anon_points = 4
$ fang_points = 4
$ wingStory = True
"Exit to main menu":
scene black with dissolve
return
@ -166,6 +163,8 @@ label chapter_select:
$ add_ending_chapters(ending_route_number)
$ add_ending_tuple(ending_route_number)
$ update_ending_variables() # Updates variables for newly extended 'chapter_list' with ending chapters
window hide