diff --git a/src/logIssueAnalyzers/createVersion.ts b/src/logIssueAnalyzers/createVersion.ts index 0d083f7..37ea24a 100644 --- a/src/logIssueAnalyzers/createVersion.ts +++ b/src/logIssueAnalyzers/createVersion.ts @@ -7,7 +7,7 @@ export const createVersionAnalyzer: Analyzer = async (log) => { 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'); + const matchesSNR = log.mods.get('railways')?.match(/1\.5\.0/); // Return an issue if both mods are present and the versions match. if (matchesCreate && matchesSNR) { return { @@ -15,5 +15,17 @@ export const createVersionAnalyzer: Analyzer = async (log) => { value: "Create: Steam 'n' Rails `1.5.0` is incompatible with `Create 0.5.1b`. Upgrade to `Create 0.5.1c` or downgrade Steam 'n' Rails.", }; } + + const matchesCreate2 = log.mods + ? log.mods.get('create') == '0.5.1.c' + : log.content.match(/create-(.)+-0\.5\.1\.c/); + const matchesSNR2 = log.mods.get('railways')?.match(/1\.4\.3/); + // Return an issue if both mods are present and the versions match. + if (matchesCreate2 && matchesSNR2) { + return { + name: 'Version error', + value: "Create: Steam 'n' Rails `1.4.3` is incompatible with `Create 0.5.1c`. Upgrade Steam 'n' Rails to `1.5.0`.", + }; + } return null; };