WTS/game/scripts/utility/saves.rpy

15 lines
426 B
Plaintext
Raw Normal View History

2022-05-16 23:48:22 +00:00
init python:
def FileJsonSave(d):
2024-04-25 19:14:25 +00:00
d["day"] = states.env.day
2022-05-16 23:48:22 +00:00
d["playtime"] = renpy.get_game_runtime()
d["version"] = version_float()
config.save_json_callbacks.append(FileJsonSave)
def FileCompatible(slot, page=None):
version = FileJson(slot, "version", missing=1.0, page=page)
if version is not None:
return version >= compatible_version
return False