mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-02-08 18:28:49 +01:00
Add ending chapters to chapter-select tool
This commit is contained in:
parent
a787d1ceaf
commit
e0027f3c5d
1 changed files with 60 additions and 15 deletions
|
@ -15,7 +15,38 @@ define chapter_tuple_2 = [
|
||||||
("11. School assignment and route lock.", "chapter_11")
|
("11. School assignment and route lock.", "chapter_11")
|
||||||
]
|
]
|
||||||
|
|
||||||
define tuples_index = [
|
define ending_1_tuple = [
|
||||||
|
("11A. ", "chapter_11A"),
|
||||||
|
("12A. ", "chapter_12A"),
|
||||||
|
("12_5D. ", "chapter_12_5D"),
|
||||||
|
("13A. ", "chapter_13A"),
|
||||||
|
("14A. ", "chapter_14A")
|
||||||
|
]
|
||||||
|
|
||||||
|
define ending_2_tuple = [
|
||||||
|
("11B. ", "chapter_11B"),
|
||||||
|
("12B. ", "chapter_12B"),
|
||||||
|
("13B. ", "chapter_13B"),
|
||||||
|
("14B. ", "chapter_14B")
|
||||||
|
]
|
||||||
|
|
||||||
|
define ending_3_tuple = [
|
||||||
|
("11C. ", "chapter_11C"),
|
||||||
|
("12C. ", "chapter_12C"),
|
||||||
|
("12_5C. ", "chapter_12_5C"),
|
||||||
|
("13C. ", "chapter_13C"),
|
||||||
|
("14C. ", "chapter_14C")
|
||||||
|
]
|
||||||
|
|
||||||
|
define ending_4_tuple = [
|
||||||
|
("11D. ", "chapter_11D"),
|
||||||
|
("12D. ", "chapter_12D"),
|
||||||
|
("12_5D. ", "chapter_12_5D"),
|
||||||
|
("13D. ", "chapter_13D"),
|
||||||
|
("14D. ", "chapter_14D")
|
||||||
|
]
|
||||||
|
|
||||||
|
default tuples_index = [
|
||||||
("Chapters 1 to 6", chapter_tuple_1),
|
("Chapters 1 to 6", chapter_tuple_1),
|
||||||
("Chapters 7 to 11", chapter_tuple_2)
|
("Chapters 7 to 11", chapter_tuple_2)
|
||||||
]
|
]
|
||||||
|
@ -34,6 +65,7 @@ init python:
|
||||||
renpy.jump("chapter_select")
|
renpy.jump("chapter_select")
|
||||||
|
|
||||||
current_chapter = display_tuple_menu(selected_tuple)
|
current_chapter = display_tuple_menu(selected_tuple)
|
||||||
|
find_chapter_in_array()
|
||||||
if current_chapter == "go_back":
|
if current_chapter == "go_back":
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
|
@ -46,20 +78,26 @@ init python:
|
||||||
renpy.call(current_chapter)
|
renpy.call(current_chapter)
|
||||||
|
|
||||||
|
|
||||||
|
def add_ending_tuple(ending_number):
|
||||||
|
global tuples_index
|
||||||
|
|
||||||
|
ending_tuples = {
|
||||||
|
1: ending_1_tuple,
|
||||||
|
2: ending_2_tuple,
|
||||||
|
3: ending_3_tuple,
|
||||||
|
4: ending_4_tuple
|
||||||
|
}
|
||||||
|
|
||||||
|
if ending_number in ending_tuples:
|
||||||
|
description = f"Ending {ending_number} chapters"
|
||||||
|
tuples_index.append((description, ending_tuples[ending_number]))
|
||||||
|
|
||||||
|
|
||||||
def display_tuple_menu(options):
|
def display_tuple_menu(options):
|
||||||
return renpy.display_menu(options + [("Go Back", "go_back")])
|
return renpy.display_menu(options + [("Go Back", "go_back")])
|
||||||
|
|
||||||
|
|
||||||
def set_stats():
|
def set_stats():
|
||||||
global ending_route_number, is_end_reached
|
|
||||||
|
|
||||||
ending_route_number = get_ending()
|
|
||||||
|
|
||||||
find_chapter_in_array()
|
|
||||||
|
|
||||||
if not is_end_reached:
|
|
||||||
add_ending_chapters(ending_route_number)
|
|
||||||
|
|
||||||
update_ending_variables() # Updates variables for newly extended 'chapter_list' with ending chapters
|
update_ending_variables() # Updates variables for newly extended 'chapter_list' with ending chapters
|
||||||
|
|
||||||
|
|
||||||
|
@ -77,7 +115,7 @@ init python:
|
||||||
chapter_list_index = chapter_list.index(current_chapter)
|
chapter_list_index = chapter_list.index(current_chapter)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
chapter_list_index = -1
|
chapter_list_index = -1
|
||||||
current_chapter = ""
|
current_chapter = "hola"
|
||||||
|
|
||||||
|
|
||||||
label reset_chapter_list:
|
label reset_chapter_list:
|
||||||
|
@ -85,11 +123,18 @@ label reset_chapter_list:
|
||||||
"chapter_1", "chapter_2", "chapter_3", "chapter_4", "chapter_5",
|
"chapter_1", "chapter_2", "chapter_3", "chapter_4", "chapter_5",
|
||||||
"chapter_6", "chapter_7", "chapter_8", "chapter_9", "chapter_10", "chapter_11"
|
"chapter_6", "chapter_7", "chapter_8", "chapter_9", "chapter_10", "chapter_11"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
$ tuples_index = [
|
||||||
|
("Chapters 1 to 6", chapter_tuple_1),
|
||||||
|
("Chapters 7 to 11", chapter_tuple_2)
|
||||||
|
]
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
label chapter_select:
|
label chapter_select:
|
||||||
$ quick_menu = False # Hides bottom quick menu UI
|
$ quick_menu = False # Hides bottom quick menu UI
|
||||||
|
call reset_chapter_list from _call_reset_chapter_list
|
||||||
|
|
||||||
$ anon_points = 0
|
$ anon_points = 0
|
||||||
$ fang_points = 0
|
$ fang_points = 0
|
||||||
|
@ -117,13 +162,13 @@ label chapter_select:
|
||||||
return
|
return
|
||||||
|
|
||||||
$ set_scores(anon_points, fang_points)
|
$ set_scores(anon_points, fang_points)
|
||||||
$ is_end_reached = False # Reset this for when the tool is used more than once
|
$ ending_route_number = get_ending()
|
||||||
|
|
||||||
|
$ add_ending_chapters(ending_route_number)
|
||||||
|
$ add_ending_tuple(ending_route_number)
|
||||||
|
|
||||||
window hide
|
window hide
|
||||||
|
|
||||||
if not is_end_reached:
|
|
||||||
call reset_chapter_list from _call_reset_chapter_list
|
|
||||||
|
|
||||||
$ select_chapter()
|
$ select_chapter()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue