mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-02-24 18:48:55 +01:00
- Add array containing general chapters labels
- Add dictionary for endings - Add chapter transition functions
This commit is contained in:
parent
670a3624c5
commit
297ca81c7c
2 changed files with 78 additions and 0 deletions
|
@ -1,3 +1,31 @@
|
||||||
|
default persistent.old_endings = None
|
||||||
|
default persistent.endings = None
|
||||||
|
|
||||||
|
# Store the general chapters inside an array for easy manipulation
|
||||||
|
define general_chapters = [
|
||||||
|
"chapter_1", "chapter_2", "chapter_3", "chapter_4", "chapter_5",
|
||||||
|
"chapter_6", "chapter_7", "chapter_8", "chapter_9", "chapter_10", "chapter_11"
|
||||||
|
]
|
||||||
|
|
||||||
|
define ending_routes = {
|
||||||
|
4: ["chapter_11D", "chapter_12D", "chapter_12_5D", "chapter_13D", "chapter_14D"],
|
||||||
|
3: ["chapter_11C", "chapter_12C", "chapter_12_5C", "chapter_13C", "chapter_14C"],
|
||||||
|
2: ["chapter_11B", "chapter_12B", "chapter_13B", "chapter_14B"],
|
||||||
|
1: ["chapter_11A", "chapter_12A", "chapter_12_5D", "chapter_13A", "chapter_14A"]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Index number for the current position of the general chapters array
|
||||||
|
define chapter_index = 0
|
||||||
|
|
||||||
|
# This will store the name of the label as a string
|
||||||
|
define current_chapter = None
|
||||||
|
|
||||||
|
default chapters_array_length = len(general_chapters) - 1
|
||||||
|
|
||||||
|
define ending_route_number = None
|
||||||
|
define ending_chapter_index = 0
|
||||||
|
|
||||||
|
|
||||||
init -1 python:
|
init -1 python:
|
||||||
def ending_image():
|
def ending_image():
|
||||||
#0b0000, DCBA, flash the bits with |=, check with &
|
#0b0000, DCBA, flash the bits with |=, check with &
|
||||||
|
@ -10,6 +38,44 @@ init -1 python:
|
||||||
persistent.old_endings = persistent.endings
|
persistent.old_endings = persistent.endings
|
||||||
persistent.endings = endings
|
persistent.endings = endings
|
||||||
|
|
||||||
|
|
||||||
|
init python:
|
||||||
|
|
||||||
|
def next_story_chapter():
|
||||||
|
global chapter_index
|
||||||
|
global current_chapter
|
||||||
|
global ending_route_number
|
||||||
|
|
||||||
|
if is_end_of_chapters():
|
||||||
|
ending_route_number = get_ending()
|
||||||
|
next_ending_chapter()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
def is_end_of_chapters():
|
||||||
|
return chapter_index >= chapters_array_length
|
||||||
|
|
||||||
|
|
||||||
|
def next_ending_chapter():
|
||||||
|
global ending_route_number, ending_chapter_index
|
||||||
|
|
||||||
|
if ending_route_number in ending_routes:
|
||||||
|
# Save the ending chapters array from
|
||||||
|
# the ending_routes dictionary
|
||||||
|
current_ending_list = 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
|
||||||
|
item = current_ending_list[ending_chapter_index]
|
||||||
|
# Increases the index and jumps to the label
|
||||||
|
ending_chapter_index += 1
|
||||||
|
renpy.jump(item)
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
label storyline:
|
label storyline:
|
||||||
call chapter_1 from _call_chapter_1
|
call chapter_1 from _call_chapter_1
|
||||||
call chapter_2 from _call_chapter_2
|
call chapter_2 from _call_chapter_2
|
||||||
|
|
|
@ -20,3 +20,15 @@ label get_ending:
|
||||||
return(2) # Doomer
|
return(2) # Doomer
|
||||||
else:
|
else:
|
||||||
return(1) # Shooter
|
return(1) # Shooter
|
||||||
|
|
||||||
|
|
||||||
|
init python:
|
||||||
|
def get_ending():
|
||||||
|
if anonscore >= 4 and fangscore >= 4 and wingStory:
|
||||||
|
return 4 # Golden
|
||||||
|
elif anonscore >= 3 and fangscore <=4:
|
||||||
|
return 3 # Tradwife
|
||||||
|
elif anonscore <= 3 and fangscore >=3:
|
||||||
|
return 2 # Doomer
|
||||||
|
else:
|
||||||
|
return 1 # Shooter
|
||||||
|
|
Loading…
Reference in a new issue