mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-01-22 17:26:20 +01:00
Add setup_ending. Endings are now determined and setup the moment branching is required.
This commit is contained in:
parent
3059d469f2
commit
c3e365d01c
3 changed files with 26 additions and 21 deletions
|
@ -447,10 +447,11 @@ label chapter_11:
|
|||
#Naser Drama
|
||||
#THIS SECTION IS SCORE DEPENDENT
|
||||
|
||||
# Doomer ending skips this segment
|
||||
$ ending_score = get_ending()
|
||||
# Determine ending and set up ending chapters
|
||||
$ setup_ending(get_ending())
|
||||
|
||||
if ending_score == 2:
|
||||
# Doomer ending skips this segment
|
||||
if ending_route_number == 2:
|
||||
stop music fadeout 3
|
||||
pause 2
|
||||
jump lPromAnnouncement
|
||||
|
@ -586,9 +587,9 @@ label chapter_11:
|
|||
Nas "Don’t take it the wrong way, but my mind just screamed at me ‘worst case scenario’."
|
||||
pause .5
|
||||
|
||||
if ending_score == 4: # Golden
|
||||
if ending_route_number == 4: # Golden
|
||||
jump lSortingThings
|
||||
elif ending_score == 3: # tradwife
|
||||
elif ending_route_number == 3: # tradwife
|
||||
jump lMendingThings
|
||||
else:
|
||||
jump lBreakingThings # All else fails, go to shooter.
|
||||
|
@ -5212,7 +5213,7 @@ label chapter_11:
|
|||
pause .5
|
||||
|
||||
|
||||
if ending_score == 3: # tradwife
|
||||
if ending_route_number == 3: # tradwife
|
||||
|
||||
"Things are going pretty well. When we discount Trish’s weekly attempt to talk with Fang."
|
||||
|
||||
|
@ -5467,7 +5468,7 @@ label chapter_11:
|
|||
"{cps=*.1}...{/cps}"
|
||||
|
||||
# skip this segment if we're doing ending 1
|
||||
if ending_score == 1: #shooter
|
||||
if ending_route_number == 1: #shooter
|
||||
$ next_story_chapter()
|
||||
|
||||
# the following segment makes sense in the context of 11B+11C+11D
|
||||
|
|
|
@ -25,3 +25,4 @@ default current_chapter = chapter_list[chapter_list_index] # Store the name of t
|
|||
|
||||
# What ending we're on
|
||||
default ending_route_number = None # A value of None signals to get_ending() to determine the value based off anon/fang scores when it is called
|
||||
default ending_chapters_determined = False
|
|
@ -13,25 +13,17 @@ init -1 python:
|
|||
|
||||
init python:
|
||||
def next_story_chapter():
|
||||
global chapter_list_index, current_chapter, chapter_list, ending_route_number, is_end_reached, chapter_list_length
|
||||
|
||||
# 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 chapter_list_index >= chapter_list_length:
|
||||
# Add ending chapters
|
||||
ending_route_number = get_ending()
|
||||
if route_number in ending_routes:
|
||||
chapter_list.extend(ending_routes[ending_route_number])
|
||||
|
||||
# Updates variables for newly extended 'chapter_list' with ending chapters
|
||||
chapter_list_length = len(chapter_list) - 1 # chapter_list_length is updated to reflect the addition to the chapter_list array
|
||||
is_end_reached = True
|
||||
|
||||
global chapter_list_index, current_chapter, chapter_list, ending_route_number, chapter_list_length, ending_chapters_determined
|
||||
|
||||
if chapter_list_index < chapter_list_length:
|
||||
chapter_list_index += 1
|
||||
current_chapter = chapter_list[chapter_list_index]
|
||||
renpy.call(current_chapter)
|
||||
|
||||
# Safeguard if setup_ending wasn't called somehow
|
||||
elif not ending_chapters_determined:
|
||||
setup_ending(get_ending())
|
||||
|
||||
# We're at an ending
|
||||
else:
|
||||
ending_image()
|
||||
|
@ -40,3 +32,14 @@ init python:
|
|||
renpy.quit()
|
||||
else:
|
||||
renpy.call("lending")
|
||||
|
||||
def setup_ending(ending):
|
||||
global ending_route_number, chapter_list, chapter_list_length, ending_chapters_determined
|
||||
|
||||
ending_route_number = ending
|
||||
|
||||
# Add ending chapters
|
||||
chapter_list.extend(ending_routes[ending_route_number])
|
||||
chapter_list_length = len(chapter_list) - 1 # chapter_list_length is updated to reflect the addition to the chapter_list array
|
||||
|
||||
ending_chapters_determined = True
|
Loading…
Reference in a new issue