forked from Cavemanon/SnootGame
Compare commits
5 Commits
908d8f62f7
...
a787d1ceaf
Author | SHA1 | Date | |
---|---|---|---|
a787d1ceaf | |||
719f08ba24 | |||
a31fa50d8a | |||
803e878c3f | |||
f38c53776c |
@ -24,7 +24,7 @@ define tuples_index = [
|
||||
init python:
|
||||
|
||||
def select_chapter():
|
||||
global current_chapter, is_end_reached, quick_menu
|
||||
global current_chapter, quick_menu
|
||||
|
||||
selected_tuple = ()
|
||||
|
||||
@ -41,7 +41,7 @@ init python:
|
||||
|
||||
set_stats()
|
||||
toggle_debug()
|
||||
quick_menu = True
|
||||
quick_menu = True # Restores the bottom quick menu UI
|
||||
|
||||
renpy.call(current_chapter)
|
||||
|
||||
@ -51,16 +51,16 @@ init python:
|
||||
|
||||
|
||||
def set_stats():
|
||||
global chapter_list_length, ending_route_number, is_end_reached
|
||||
global ending_route_number, is_end_reached
|
||||
|
||||
ending_route_number = get_ending()
|
||||
|
||||
find_chapter_in_array()
|
||||
|
||||
if not is_end_reached:
|
||||
add_ending_chapters() # From storyline
|
||||
add_ending_chapters(ending_route_number)
|
||||
|
||||
update_ending_variables() # From storyline
|
||||
update_ending_variables() # Updates variables for newly extended 'chapter_list' with ending chapters
|
||||
|
||||
|
||||
def set_scores(anon_score, fang_score):
|
||||
@ -89,7 +89,10 @@ label reset_chapter_list:
|
||||
|
||||
|
||||
label chapter_select:
|
||||
$ quick_menu = False
|
||||
$ quick_menu = False # Hides bottom quick menu UI
|
||||
|
||||
$ anon_points = 0
|
||||
$ fang_points = 0
|
||||
|
||||
stop sound
|
||||
stop music fadeout 2
|
||||
@ -99,17 +102,21 @@ label chapter_select:
|
||||
"Initialize scores:"
|
||||
|
||||
"Ending 1":
|
||||
$ set_scores(0, 0)
|
||||
pass # Since points are already initialized at 0
|
||||
"Ending 2":
|
||||
$ set_scores(0, 4)
|
||||
# anon 0
|
||||
$ fang_points = 4
|
||||
"Ending 3":
|
||||
$ set_scores(4, 0)
|
||||
$ anon_points = 4
|
||||
# fang 0
|
||||
"Ending 4":
|
||||
$ set_scores(4, 4)
|
||||
$ anon_points = 4
|
||||
$ fang_points = 4
|
||||
"Exit to main menu":
|
||||
scene black with dissolve
|
||||
return
|
||||
|
||||
$ set_scores(anon_points, fang_points)
|
||||
$ is_end_reached = False # Reset this for when the tool is used more than once
|
||||
|
||||
window hide
|
||||
@ -120,4 +127,3 @@ label chapter_select:
|
||||
$ select_chapter()
|
||||
|
||||
|
||||
|
||||
|
@ -13,10 +13,10 @@ init -1 python:
|
||||
|
||||
init python:
|
||||
def next_story_chapter():
|
||||
global chapter_list_index, current_chapter, ending_route_number
|
||||
global chapter_list_index, current_chapter
|
||||
|
||||
# Add check "is_end_reached" to have this if statement be executed only once when finishing the general chapters
|
||||
if not is_end_reached and is_end_of_chapters():
|
||||
if not is_end_reached and chapter_list_index >= chapter_list_length:
|
||||
process_ending()
|
||||
|
||||
if chapter_list_index < chapter_list_length:
|
||||
@ -27,23 +27,19 @@ init python:
|
||||
end_story()
|
||||
|
||||
|
||||
def is_end_of_chapters():
|
||||
return chapter_list_index >= chapter_list_length
|
||||
|
||||
|
||||
def process_ending():
|
||||
global ending_route_number
|
||||
|
||||
ending_route_number = get_ending()
|
||||
add_ending_chapters()
|
||||
update_ending_variables()
|
||||
add_ending_chapters(ending_route_number)
|
||||
update_ending_variables() # Updates variables for newly extended 'chapter_list' with ending chapters
|
||||
|
||||
|
||||
def add_ending_chapters():
|
||||
def add_ending_chapters(route_number):
|
||||
global chapter_list
|
||||
|
||||
if ending_route_number in ending_routes:
|
||||
chapter_list.extend(ending_routes[ending_route_number])
|
||||
if route_number in ending_routes:
|
||||
chapter_list.extend(ending_routes[route_number])
|
||||
|
||||
|
||||
def update_ending_variables():
|
||||
@ -59,7 +55,6 @@ init python:
|
||||
return len(chapter_list) - 1
|
||||
|
||||
|
||||
|
||||
def end_story():
|
||||
ending_image()
|
||||
renpy.call("lending")
|
||||
|
@ -1,8 +1,3 @@
|
||||
[tasks.patch]
|
||||
type = "custom"
|
||||
enabled = true
|
||||
ver = "8.3.0"
|
||||
|
||||
[tasks.keystore] # required if matching task is enabled
|
||||
type="keystore"
|
||||
enabled = true
|
||||
|
Reference in New Issue
Block a user