mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-01-22 17:26:20 +01:00
Move story global variables initialization to the "initstats" label
This commit is contained in:
parent
806151f430
commit
ce05fd5cdb
2 changed files with 14 additions and 21 deletions
|
@ -12,17 +12,6 @@ define ending_routes = {
|
|||
}
|
||||
|
||||
|
||||
default chapter_list_length = len(chapter_list) - 1
|
||||
default chapter_list_index = 0 # Index number for the current position of the general chapters array
|
||||
|
||||
# This stores the name of the label as a string
|
||||
# When starting a new game, it takes the first element of the chapter_list array
|
||||
default current_chapter = chapter_list[chapter_list_index]
|
||||
|
||||
default ending_route_number = None
|
||||
default is_end_reached = False
|
||||
|
||||
|
||||
init -1 python:
|
||||
def ending_image():
|
||||
#0b0000, DCBA, flash the bits with |=, check with &
|
||||
|
|
|
@ -9,6 +9,15 @@ label initstats(anon=0, fang=0):
|
|||
$ fangscore = fang
|
||||
$ wingStory = False
|
||||
|
||||
# Chapter related variables
|
||||
$ chapter_list_length = len(chapter_list) - 1
|
||||
$ chapter_list_index = 0 # Index number for the current position of the chapter_list array
|
||||
$ current_chapter = chapter_list[chapter_list_index] # Store the name of the label as a string
|
||||
|
||||
# Ending related variables
|
||||
$ ending_route_number = None
|
||||
$ is_end_reached = False
|
||||
|
||||
if persistent.enable_debug_scores:
|
||||
$ debug_story_variables(False)
|
||||
$ debug_story_variables(True)
|
||||
|
@ -28,20 +37,15 @@ init python:
|
|||
return 1 # Shooter
|
||||
|
||||
|
||||
def debug_story_variables(toggle=True, use_ending_chapter=False):
|
||||
def debug_story_variables(toggle=True):
|
||||
var_list = [
|
||||
"anonscore",
|
||||
"fangscore",
|
||||
"chapter_index",
|
||||
"ending_route_number",
|
||||
"ending_chapter_index"
|
||||
"current_chapter",
|
||||
"chapter_list_length",
|
||||
"chapter_list_index",
|
||||
"ending_route_number"
|
||||
]
|
||||
|
||||
if use_ending_chapter:
|
||||
var_list.remove("chapter_index")
|
||||
var_list.append("current_ending_chapter")
|
||||
else:
|
||||
var_list.append("current_general_chapter")
|
||||
|
||||
for item in var_list:
|
||||
if toggle:
|
||||
|
|
Loading…
Reference in a new issue