From 71d3771c1d856d2d4c1a9313a0441db2104c8b6d Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 7 Mar 2022 13:44:10 -0800 Subject: [PATCH] Add "check disc" to LaserLok --- BurnOutSharp/ProtectionType/LaserLok.cs | 40 ++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/BurnOutSharp/ProtectionType/LaserLok.cs b/BurnOutSharp/ProtectionType/LaserLok.cs index 28a847fc..9a8bef3f 100644 --- a/BurnOutSharp/ProtectionType/LaserLok.cs +++ b/BurnOutSharp/ProtectionType/LaserLok.cs @@ -87,11 +87,11 @@ namespace BurnOutSharp.ProtectionType } if (containsCheck && containsCheck2) - return $"LaserLok {GetVersion(pex.TextSectionRaw, position2)} {GetBuild(pex.TextSectionRaw, true)}" + (includeDebug ? $" (Index {position}, {position2})" : string.Empty); + return $"LaserLok {GetVersion(pex.TextSectionRaw, position2)} {GetBuild(pex.TextSectionRaw, true)} [Check disc for physical ring]" + (includeDebug ? $" (Index {position}, {position2})" : string.Empty); else if (containsCheck && !containsCheck2) - return $"LaserLok Marathon {GetBuild(pex.TextSectionRaw, false)}" + (includeDebug ? $" (Index {position})" : string.Empty); + return $"LaserLok Marathon {GetBuild(pex.TextSectionRaw, false)} [Check disc for physical ring]" + (includeDebug ? $" (Index {position})" : string.Empty); else if (!containsCheck && containsCheck2) - return $"LaserLok {GetVersion(pex.TextSectionRaw, --position2)} {GetBuild(pex.TextSectionRaw, false)}" + (includeDebug ? $" (Index {position2})" : string.Empty); + return $"LaserLok {GetVersion(pex.TextSectionRaw, --position2)} {GetBuild(pex.TextSectionRaw, false)} [Check disc for physical ring]" + (includeDebug ? $" (Index {position2})" : string.Empty); return null; } @@ -101,17 +101,17 @@ namespace BurnOutSharp.ProtectionType { var matchers = new List { - new PathMatchSet($"LASERLOK{Path.DirectorySeparatorChar}", "LaserLok"), + new PathMatchSet($"LASERLOK{Path.DirectorySeparatorChar}", "LaserLok [Check disc for physical ring]"), // TODO: Verify if these are OR or AND - new PathMatchSet(new PathMatch("NOMOUSE.SP", useEndsWith: true), GetVersion16Bit, "LaserLok"), - new PathMatchSet(new PathMatch("NOMOUSE.COM", useEndsWith: true), "LaserLok"), - new PathMatchSet(new PathMatch("l16dll.dll", useEndsWith: true), "LaserLok"), - new PathMatchSet(new PathMatch("laserlok.in", useEndsWith: true), "LaserLok"), - new PathMatchSet(new PathMatch("laserlok.o10", useEndsWith: true), "LaserLok"), - new PathMatchSet(new PathMatch("laserlok.o11", useEndsWith: true), "LaserLok"), - new PathMatchSet(new PathMatch("laserlok.o12", useEndsWith: true), "LaserLok"), - new PathMatchSet(new PathMatch("laserlok.out", useEndsWith: true), "LaserLok"), + new PathMatchSet(new PathMatch("NOMOUSE.SP", useEndsWith: true), GetVersion16Bit, "LaserLok [Check disc for physical ring]"), + new PathMatchSet(new PathMatch("NOMOUSE.COM", useEndsWith: true), "LaserLok [Check disc for physical ring]"), + new PathMatchSet(new PathMatch("l16dll.dll", useEndsWith: true), "LaserLok [Check disc for physical ring]"), + new PathMatchSet(new PathMatch("laserlok.in", useEndsWith: true), "LaserLok [Check disc for physical ring]"), + new PathMatchSet(new PathMatch("laserlok.o10", useEndsWith: true), "LaserLok [Check disc for physical ring]"), + new PathMatchSet(new PathMatch("laserlok.o11", useEndsWith: true), "LaserLok [Check disc for physical ring]"), + new PathMatchSet(new PathMatch("laserlok.o12", useEndsWith: true), "LaserLok [Check disc for physical ring]"), + new PathMatchSet(new PathMatch("laserlok.out", useEndsWith: true), "LaserLok [Check disc for physical ring]"), }; return MatchUtil.GetAllMatches(files, matchers, any: true); @@ -122,16 +122,16 @@ namespace BurnOutSharp.ProtectionType { var matchers = new List { - new PathMatchSet(new PathMatch("NOMOUSE.SP", useEndsWith: true), GetVersion16Bit, "LaserLok"), + new PathMatchSet(new PathMatch("NOMOUSE.SP", useEndsWith: true), GetVersion16Bit, "LaserLok [Check disc for physical ring]"), // TODO: Verify if these are OR or AND - new PathMatchSet(new PathMatch("NOMOUSE.COM", useEndsWith: true), "LaserLok"), - new PathMatchSet(new PathMatch("l16dll.dll", useEndsWith: true), "LaserLok"), - new PathMatchSet(new PathMatch("laserlok.in", useEndsWith: true), "LaserLok"), - new PathMatchSet(new PathMatch("laserlok.o10", useEndsWith: true), "LaserLok"), - new PathMatchSet(new PathMatch("laserlok.o11", useEndsWith: true), "LaserLok"), - new PathMatchSet(new PathMatch("laserlok.o12", useEndsWith: true), "LaserLok"), - new PathMatchSet(new PathMatch("laserlok.out", useEndsWith: true), "LaserLok"), + new PathMatchSet(new PathMatch("NOMOUSE.COM", useEndsWith: true), "LaserLok [Check disc for physical ring]"), + new PathMatchSet(new PathMatch("l16dll.dll", useEndsWith: true), "LaserLok [Check disc for physical ring]"), + new PathMatchSet(new PathMatch("laserlok.in", useEndsWith: true), "LaserLok [Check disc for physical ring]"), + new PathMatchSet(new PathMatch("laserlok.o10", useEndsWith: true), "LaserLok [Check disc for physical ring]"), + new PathMatchSet(new PathMatch("laserlok.o11", useEndsWith: true), "LaserLok [Check disc for physical ring]"), + new PathMatchSet(new PathMatch("laserlok.o12", useEndsWith: true), "LaserLok [Check disc for physical ring]"), + new PathMatchSet(new PathMatch("laserlok.out", useEndsWith: true), "LaserLok [Check disc for physical ring]"), }; return MatchUtil.GetFirstMatch(path, matchers, any: true);