@@ -20,6 +20,12 @@ init -10 python:
2020# # You'll need a block like this for creator defined screen language
2121# # Don't use this unless you know you need it
2222python early in mas_overrides:
23+ import threading
24+
25+ import renpy
26+ import renpy.savelocation as savelocation
27+
28+
2329 def verify_data_override (data , signatures , check_verifying = True ):
2430 """
2531 Verify the data in a save token.
@@ -30,3 +36,33 @@ python early in mas_overrides:
3036 return True
3137
3238 renpy.savetoken.verify_data = verify_data_override
39+
40+
41+ def savelocation_init_override ():
42+ """
43+ Run **SOME** of the stuff savelocation.init runs
44+
45+ basically we trying to keep saves in the AppData/equivalent folder
46+ to make backups/restoring easier.
47+
48+ The only difference here is that this skips over game savedirs and
49+ 'extra' save dirs (so just omissions)
50+ """
51+ savelocation.quit()
52+ savelocation.quit_scan_thread = False
53+
54+ location = savelocation.MultiLocation()
55+
56+ location.add(savelocation.FileLocation(renpy.config.savedir))
57+
58+ location.scan()
59+
60+ renpy.loadsave.location = location
61+
62+ if not renpy.emscripten:
63+ savelocation.scan_thread = threading.Thread(target = savelocation.run_scan_thread)
64+ savelocation.scan_thread.start()
65+
66+ savelocation.init = savelocation_init_override
67+
68+
0 commit comments