-
Notifications
You must be signed in to change notification settings - Fork 0
/
patch_.py
30 lines (27 loc) · 926 Bytes
/
patch_.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from core.data.save_system.update import updateSave
from core.data.save_system.walk import listSaves
from core.file_system.parsers import loadTOML
from os.path import exists
from os import remove
# PATCH_NAME = Patch_PreAlpha5
try:
if not exists(".dev"):
for save in listSaves(False):
presave = f"saves/{save}/buffer/presave.toml"
if exists(presave):
data = loadTOML(presave)
# filling missing 'settings' data
data["settings"] = {
"permadeath": False
}
try:
updateSave(save, data)
remove(presave)
except Exception as e:
print(e)
print("Saves updated successfully")
else:
print("Developer's build, no updating was performed")
except Exception as e:
print(e)
input("Press Enter to finish")