mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-01-22 09:16:56 +01:00
Add chapter_select
This commit is contained in:
parent
966fca9fc5
commit
72ea3dd640
1 changed files with 85 additions and 11 deletions
|
@ -1,12 +1,86 @@
|
|||
screen label_selector():
|
||||
tag menu
|
||||
define chapter_tuple_1 = [
|
||||
("1", "chapter_1"),
|
||||
("2", "chapter_2"),
|
||||
("3", "chapter_3"),
|
||||
("4", "chapter_4"),
|
||||
("5", "chapter_5"),
|
||||
("6", "chapter_6")
|
||||
]
|
||||
|
||||
define chapter_tuple_2 = [
|
||||
("7", "chapter_7"),
|
||||
("8", "chapter_8"),
|
||||
("9", "chapter_9"),
|
||||
("10", "chapter_10"),
|
||||
("11", "chapter_11")
|
||||
]
|
||||
|
||||
define tuples_index = [
|
||||
("1-6", chapter_tuple_1),
|
||||
("7-11", chapter_tuple_2)
|
||||
]
|
||||
|
||||
default selected_tuple = None
|
||||
|
||||
|
||||
init python:
|
||||
|
||||
def select_chapter():
|
||||
global selected_tuple, current_chapter
|
||||
|
||||
selected_tuple = renpy.display_menu(tuples_index)
|
||||
current_chapter = renpy.display_menu(selected_tuple)
|
||||
|
||||
set_stats()
|
||||
|
||||
|
||||
def set_stats():
|
||||
global chapter_list_length, chapter_list_index, ending_route_number, is_end_reached
|
||||
|
||||
chapter_list_length = len(chapter_list) - 1
|
||||
|
||||
find_chapter_in_array()
|
||||
|
||||
renpy.call(current_chapter)
|
||||
|
||||
|
||||
def find_chapter_in_array():
|
||||
global chapter_list_index, current_chapter
|
||||
|
||||
try:
|
||||
chapter_list_index = chapter_list.index(current_chapter)
|
||||
except ValueError:
|
||||
chapter_list_index = -1
|
||||
current_chapter = ""
|
||||
|
||||
|
||||
|
||||
|
||||
label chapter_select:
|
||||
scene black
|
||||
stop sound
|
||||
stop music
|
||||
|
||||
menu:
|
||||
"Initialize scores:"
|
||||
|
||||
"Ending 1":
|
||||
$ anon_score = 0
|
||||
$ fang_score = 0
|
||||
"Ending 2":
|
||||
$ anon_score = 0
|
||||
$ fang_score = 4
|
||||
"Ending 3":
|
||||
$ anon_score = 4
|
||||
$ fang_score = 0
|
||||
"Ending 4":
|
||||
$ anon_score = 4
|
||||
$ fang_score = 4
|
||||
|
||||
$ lock_scores = True
|
||||
call initstats(anon_score, fang_score) from _call_initstats_2
|
||||
|
||||
$ select_chapter()
|
||||
|
||||
|
||||
|
||||
frame:
|
||||
align (0.5, 0.5)
|
||||
padding (20, 20)
|
||||
vbox:
|
||||
spacing 10
|
||||
text "Choose a Label:"
|
||||
for label in chapter_list:
|
||||
textbutton label:
|
||||
action Call(label)
|
||||
|
|
Loading…
Reference in a new issue