mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-03-23 02:22:49 +01:00
storyline code cleanup
This commit is contained in:
parent
7084451986
commit
098c7dd021
1 changed files with 0 additions and 25 deletions
|
@ -24,8 +24,6 @@ default chapter_index = 0 # Index number for the current position of the general
|
||||||
default current_general_chapter = general_chapters[chapter_index]
|
default current_general_chapter = general_chapters[chapter_index]
|
||||||
|
|
||||||
default ending_route_number = None
|
default ending_route_number = None
|
||||||
default current_ending_chapter = None
|
|
||||||
default ending_chapter_index = 0
|
|
||||||
|
|
||||||
default is_end_reached = False
|
default is_end_reached = False
|
||||||
|
|
||||||
|
@ -80,27 +78,4 @@ init python:
|
||||||
general_chapters = tuple(general_chapters)
|
general_chapters = tuple(general_chapters)
|
||||||
|
|
||||||
|
|
||||||
def next_ending_chapter():
|
|
||||||
global ending_route_number
|
|
||||||
global ending_chapter_index
|
|
||||||
global current_ending_chapter
|
|
||||||
|
|
||||||
if ending_route_number in ending_routes:
|
|
||||||
# Save the ending chapters array from
|
|
||||||
# the ending_routes dictionary
|
|
||||||
current_ending_list: list[str] = ending_routes[ending_route_number]
|
|
||||||
|
|
||||||
if ending_chapter_index < len(current_ending_list):
|
|
||||||
# Stores the label name from the current_ending_list array in the item variable
|
|
||||||
current_ending_chapter = current_ending_list[ending_chapter_index]
|
|
||||||
# The item is assigned first and then increase the ending_chapter_index as it can't be done after using renpy.jump()
|
|
||||||
|
|
||||||
# Increases the index and jumps to the label
|
|
||||||
ending_chapter_index += 1
|
|
||||||
renpy.jump(current_ending_chapter)
|
|
||||||
else: # We've reached the end of the final chapters
|
|
||||||
ending_image()
|
|
||||||
renpy.call("lending")
|
|
||||||
else:
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue