Modify debug_story_variables to append or remove elements accordingly

This commit is contained in:
Iggy 2024-08-17 13:24:22 -03:00
parent e4d7b18bf2
commit fc903d08fb

View file

@ -44,15 +44,21 @@ init python:
var_list = [ var_list = [
"anonscore", "anonscore",
"fangscore", "fangscore",
"current_general_chapter" if not use_ending_chapter else "current_ending_chapter",
"chapter_index", "chapter_index",
"ending_route_number", "ending_route_number",
"ending_chapter_index" "ending_chapter_index"
] ]
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: for item in var_list:
if toggle: if toggle:
renpy.watch(item) renpy.watch(item)
else: else:
renpy.unwatch(item) renpy.unwatch(item)