-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathplugin.js
44 lines (40 loc) · 1 KB
/
plugin.js
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
export default class CCPresetRevival {
prestart() {
sc.TitleScreenButtonGui.inject({
init() {
this.parent();
this._createButton(
'preset',
this.buttons.last().hook.pos.y + 39,
this.buttons.length,
() => {
this.background.doStateTransition('DEFAULT');
this.presetMenu.activate();
},
'preset',
);
},
});
const oldNames = [
'0-before-boss',
'1-rhombus-dng-start',
'2-continue-story',
'3-autumn-rise',
'4-apollo-duel',
'5-before-bergen',
'6-before-maroon',
'7-fajro-temple',
'8-autumns-fall',
];
//sc.savePreset.slots = [];
const fs = require('fs');
const files = fs.readdirSync('assets/data/save-presets/');
for (const file of files) {
const name = file.replace('.json', '');
if (oldNames.includes(name)) {
continue;
}
sc.savePreset.slots.push(new sc.SavePresetData(name));
}
}
}