-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrules.js
More file actions
38 lines (33 loc) · 1.25 KB
/
rules.js
File metadata and controls
38 lines (33 loc) · 1.25 KB
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
// rules can use methods from Model, they will be bound to it
class Rules {
static listMods(line) {
var codeModulesMatches = line.matchAll(/.*Registered code module .* for module (.*) ([0-9\.]+)\./g);
for (const [_, mod, version] of codeModulesMatches) {
this.addLoadedMod(mod, version);
}
var nonCodeModulesMatches = line.matchAll(/.*Non-code module (.*) ([0-9\.]+) registered\./g);
for (const [_, mod, version] of nonCodeModulesMatches) {
this.addLoadedMod(mod, version);
}
}
static checkSJCrash(line) {
if (line.includes("System.ArgumentNullException: Value cannot be null. (Parameter 'method')")) {
this.addIssue('"Strawberry Jam" mod is out of date, you need to update it.');
}
}
static checkFMODCrash(line) {
if (line.includes("Exception: FMOD Failed: ERR_OUTPUT_INIT")) {
this.addIssue("Something went wrong with the sound engine used by Celeste.");
}
}
static checkOutOfMemoryException(line) {
if (line.includes("System.OutOfMemoryException")) {
this.addIssue("You've got too many mods (including maps) installed, and your PC/laptop can't handle them all.");
}
}
static checkSteam(line) {
if (line.includes("Steam not found!")) {
this.addIssue("Ensure that Steam is running, restart it if necessary.");
}
}
}