I started something, but it doesn’t seem like a proper solution.
I save the current label in a json whenever the game is saved
Code: Select all
def label_callback(name, abnormal):
if name.startswith("_"): return
store.current_label = name
config.label_callback = label_callback
def save_chapter_name(d):
d["chapter"] = current_label
config.save_json_callbacks.append(save_chapter_name)I take the name of the newest slot and use it to get the label name from the json
Code: Select all
def newest_slot_tuple():
newest = renpy.newest_slot()
if newest is not None:
page, name = newest.split("-")
return (page, name)
def last_chapter_saved():
newest_page, newest_name = newest_slot_tuple()
return FileJson(newest_name, "chapter")Code: Select all
def continue_image_button():
if last_chapter_saved() == "chapter1" or last_chapter_saved() == "ch1_story":
...