forked from Cavemanon/SnootGame
Compare commits
2 Commits
a787d1ceaf
...
b1cc24fb2e
Author | SHA1 | Date | |
---|---|---|---|
b1cc24fb2e | |||
e0027f3c5d |
@ -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,35 +65,38 @@ init python:
|
|||||||
renpy.jump("chapter_select")
|
renpy.jump("chapter_select")
|
||||||
|
|
||||||
current_chapter = display_tuple_menu(selected_tuple)
|
current_chapter = display_tuple_menu(selected_tuple)
|
||||||
|
|
||||||
if current_chapter == "go_back":
|
if current_chapter == "go_back":
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
|
find_chapter_in_array(current_chapter)
|
||||||
break
|
break
|
||||||
|
|
||||||
set_stats()
|
|
||||||
toggle_debug()
|
toggle_debug()
|
||||||
quick_menu = True # Restores the bottom quick menu UI
|
quick_menu = True # Restores the bottom quick menu UI
|
||||||
|
|
||||||
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():
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
def set_scores(anon_score, fang_score):
|
def set_scores(anon_score, fang_score):
|
||||||
global anonscore, fangscore
|
global anonscore, fangscore
|
||||||
|
|
||||||
@ -70,14 +104,14 @@ init python:
|
|||||||
fangscore = fang_score
|
fangscore = fang_score
|
||||||
|
|
||||||
|
|
||||||
def find_chapter_in_array():
|
def find_chapter_in_array(chapter):
|
||||||
global chapter_list_index, current_chapter
|
global chapter_list_index
|
||||||
|
|
||||||
try:
|
try:
|
||||||
chapter_list_index = chapter_list.index(current_chapter)
|
chapter_list_index = chapter_list.index(chapter)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
chapter_list_index = -1
|
chapter_list_index = -1
|
||||||
current_chapter = ""
|
chapter = ""
|
||||||
|
|
||||||
|
|
||||||
label reset_chapter_list:
|
label reset_chapter_list:
|
||||||
@ -85,11 +119,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 # Reset every time the tool is called
|
||||||
|
|
||||||
$ anon_points = 0
|
$ anon_points = 0
|
||||||
$ fang_points = 0
|
$ fang_points = 0
|
||||||
@ -112,18 +153,21 @@ label chapter_select:
|
|||||||
"Ending 4":
|
"Ending 4":
|
||||||
$ anon_points = 4
|
$ anon_points = 4
|
||||||
$ fang_points = 4
|
$ fang_points = 4
|
||||||
|
$ wingStory = True
|
||||||
"Exit to main menu":
|
"Exit to main menu":
|
||||||
scene black with dissolve
|
scene black with dissolve
|
||||||
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)
|
||||||
|
|
||||||
|
$ update_ending_variables() # Updates variables for newly extended 'chapter_list' with ending chapters
|
||||||
|
|
||||||
window hide
|
window hide
|
||||||
|
|
||||||
if not is_end_reached:
|
|
||||||
call reset_chapter_list from _call_reset_chapter_list
|
|
||||||
|
|
||||||
$ select_chapter()
|
$ select_chapter()
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user