-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
main.ssz
60 lines (52 loc) · 1.36 KB
/
main.ssz
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
lib file = <file.ssz>;
lib sh = <shell.ssz>;
lib s = <string.ssz>;
lib lua = <alpha/lua.ssz>;
lib cfg = "save/config.ssz";
//Open Game Executable
sh.open(.cfg.Executable, "ssz/ikemen.ssz", "", false, true);
////////////////////
//BACKUP DATA FILES
////////////////////
//Stats File
const ^/char statsfile = "save/stats_sav.json";
if(#file.find(statsfile) == 0){
&file.File f;
f.open(statsfile, "wb");
f.writeAry!ubyte?()<, s.sToU8(
\xfeff
"{
}"
);
}
//Host Rooms File
const ^/char hostroomsfile = "save/host_rooms.json";
if(#file.find(hostroomsfile) == 0){
&file.File f;
f.open(hostroomsfile, "wb");
f.writeAry!ubyte?()<, s.sToU8(
\xfeff
"{
}"
);
}
//No DLC Backup
const ^/char dlcfile = "script/mods/DLC.lua";
if(#file.find(dlcfile) == 0){
&file.File f;
f.open(dlcfile, "wb");
f.writeAry!ubyte?()<, s.sToU8(
\xfeff
"--This is a default DLC Status script example, so if your dlc script is remove at some point, the engine will create this "\""default file"\""
DLC1 = false --If you delete me, I will always return as false!
--The answer lies in the heart of main.ssz and CD3 was here."
);
}
//Playback Backup
loop{index i = 0; %int j .= -1; while; do:
if(#file.find("save/playback/" + ''i + ".dat") == 0){
&file.File f;
f.open("save/playback/" + ''i + ".dat", "wb");
f.writeAry!int?(j);
}
while ++i <= 5:}