Skip to content

Commit

Permalink
add eb error message
Browse files Browse the repository at this point in the history
Signed-off-by: IThundxr <[email protected]>
  • Loading branch information
IThundxr committed Aug 28, 2023
1 parent 715ba2a commit c53801c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 17 deletions.
6 changes: 3 additions & 3 deletions src/logIssueAnalyzers/_logIssueAnalyzers.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Analyzer } from '../handlers/log.handler';
import { createVersionAnalyzer } from './createVersion';
import { minecraftVersionAnalyzer } from './minecraftVersion';
import { extendedBogeysAnalyzer } from './extendedBogeys';
import { optifineAnalyzer } from './optifine';

export const logAnalyzers: Analyzer[] = [
optifineAnalyzer,
minecraftVersionAnalyzer,
createVersionAnalyzer,
extendedBogeysAnalyzer,
optifineAnalyzer,
];

export default logAnalyzers;
5 changes: 4 additions & 1 deletion src/logIssueAnalyzers/createVersion.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { Analyzer } from '../handlers/log.handler';

export const createVersionAnalyzer: Analyzer = async (log) => {
if (!log.mods) return null;

// Versions of Create 0.5.1b and Steam 'n' Rails 1.5.0 are incompatible.
const matchesCreate = log.mods
? log.mods.get('create') == '0.5.1.b'
: log.content.match(/create-(.)+-0\.5\.1\.b/);
if (!log.mods) return null;
const matchesSNR = log.mods.get('railways')?.includes('1.5.0');
// Return an issue if both mods are present and the versions match.
if (matchesCreate && matchesSNR) {
return {
name: 'Incompatible with Create 0.5.1b',
Expand Down
22 changes: 22 additions & 0 deletions src/logIssueAnalyzers/extendedBogeys.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Analyzer } from '../handlers/log.handler';

export const extendedBogeysAnalyzer: Analyzer = async (log) => {
if (!log.mods) return null;

const matchesExtendedBogeys = log.mods
? log.mods.has('extendedbogeys')
: log.content.match(
/NoSuchMethodError: 'com\.jozufozu\.flywheel\.util\.transform\.Transform\[\]/
);
const matchesCreate = log.mods
? log.mods.get('create') == '0.5.1.b'
: log.content.match(/create-(.)+-0\.5\.1\.b/);
const matchesSNR = log.mods.get('railways')?.includes('1.5.0');
if (matchesExtendedBogeys && matchesCreate && matchesSNR) {
return {
name: 'Extended Bogeys',
value: "Extended Bogeys has not yet updated to work with `0.5.1c/d`. Please downgrade to `0.5.1b`. And downgrade Steam 'n' Rails.",
};
}
return null;
};
13 changes: 0 additions & 13 deletions src/logIssueAnalyzers/minecraftVersion.ts

This file was deleted.

0 comments on commit c53801c

Please sign in to comment.