Skip to content

Commit

Permalink
optifine checker advanced edition
Browse files Browse the repository at this point in the history
Signed-off-by: IThundxr <contact@ithundxr.dev>
  • Loading branch information
IThundxr committed Nov 11, 2023
1 parent 2108200 commit 21c35c3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
8 changes: 0 additions & 8 deletions src/logIssueAnalyzers/createVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,5 @@ export const createVersionAnalyzer: Analyzer = async (log) => {
};
}

// Steam 'n' Rails is currently incompatible with Create 0.5.1.e
// if (log.mods.get('create') == '0.5.1.e') {
// return {
// name: 'Incompatible with Create 0.5.1.e',
// value: "Create: Steam 'n' Rails is currently incompatible with `Create 0.5.1.e`. 'Please downgrade to `Create 0.5.1.d` if you are are `1.20.1` or `Create 0.5.1c.c` if you are on `1.19.2`.",
// };
// }

return null;
};
22 changes: 15 additions & 7 deletions src/logIssueAnalyzers/optifine.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
import { Analyzer } from '../handlers/log.handler';

export const optifineAnalyzer: Analyzer = async (log) => {
const matchesOptifine = log.mods
? log.mods.has('optifine')
: log.content.match(/f_174747_/);
const matchesOptifine = log.content.match(
/Optifine Has been detected, Disabled Warning Status: (true|false)/
);

if (matchesOptifine) {
return {
name: 'Incompatible with OptiFine',
value: "OptiFine breaks Steam 'n' Rails and is Incompatible\n\nCheck `/tag optifine` for more info & alternatives you can use.",
};
if (matchesOptifine?.[1] == 'true') {
return {
name: 'Optifine Warning Disabled',
value: 'You appeared to have disabled the Optifine warning. Many issues you might encounter are caused by Optifine. You will most likely get any support due to this.',
};
} else {
return {
name: 'Incompatible with OptiFine',
value: "OptiFine breaks Steam 'n' Rails and is Incompatible\n\nCheck `/tag optifine` for more info & alternatives you can use.",
};
}
}
return null;
};

0 comments on commit 21c35c3

Please sign in to comment.