mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-03-26 03:44:47 +01:00
Modify storyline to extend the chapters array once the common chapters are finished
This commit is contained in:
parent
01e9ababa2
commit
ba0024f251
1 changed files with 26 additions and 15 deletions
|
@ -27,6 +27,8 @@ default ending_route_number = None
|
|||
default current_ending_chapter = None
|
||||
default ending_chapter_index = 0
|
||||
|
||||
default is_end_reached = False
|
||||
|
||||
|
||||
init -1 python:
|
||||
def ending_image():
|
||||
|
@ -47,23 +49,37 @@ init python:
|
|||
global chapter_index
|
||||
global current_general_chapter
|
||||
global ending_route_number
|
||||
global is_end_reached
|
||||
|
||||
if is_end_of_chapters():
|
||||
if not is_end_reached and is_end_of_chapters():
|
||||
ending_route_number = get_ending()
|
||||
reset_debug_scores()
|
||||
next_ending_chapter()
|
||||
# return
|
||||
|
||||
chapter_index += 1
|
||||
current_general_chapter = general_chapters[chapter_index]
|
||||
|
||||
renpy.call(current_general_chapter)
|
||||
|
||||
add_ending_chapters()
|
||||
is_end_reached = True
|
||||
|
||||
if chapter_index < chapters_array_length:
|
||||
chapter_index += 1
|
||||
current_general_chapter = general_chapters[chapter_index]
|
||||
renpy.call(current_general_chapter)
|
||||
else:
|
||||
ending_image()
|
||||
renpy.call("lending")
|
||||
|
||||
|
||||
def is_end_of_chapters():
|
||||
return chapter_index >= chapters_array_length
|
||||
|
||||
|
||||
def add_ending_chapters():
|
||||
global general_chapters
|
||||
global chapters_array_length
|
||||
|
||||
if ending_route_number in ending_routes:
|
||||
general_chapters.extend(ending_routes[ending_route_number])
|
||||
chapters_array_length = len(general_chapters) - 1
|
||||
# renpy.block_rollback() BLOQUEAR O CAMBIARLO A TUPLE
|
||||
general_chapters = tuple(general_chapters)
|
||||
|
||||
|
||||
def next_ending_chapter():
|
||||
global ending_route_number
|
||||
global ending_chapter_index
|
||||
|
@ -88,8 +104,3 @@ init python:
|
|||
else:
|
||||
return
|
||||
|
||||
|
||||
def reset_debug_scores():
|
||||
if config.developer and persistent.enable_debug_scores:
|
||||
debug_story_variables(False)
|
||||
debug_story_variables(True, True)
|
||||
|
|
Loading…
Add table
Reference in a new issue