log_analyzer: Fix cheat detection (#101)

This commit is contained in:
TSRBerry 2024-05-18 18:24:03 +02:00 committed by GitHub
parent 86c8bc87b1
commit 7b5b9fc104
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -397,7 +397,10 @@ class LogAnalyser:
self._game_info["mods"] = "\n".join(mods_status)
def __get_cheats(self):
cheat_regex = re.compile(r"Tampering program\s<(.+)>")
# Make sure to skip cheats which fail to compile
cheat_regex = re.compile(
r"Installing cheat\s'(.+)'(?!\s\d{2}:\d{2}:\d{2}\.\d{3}\s\|E\|\sTamperMachine\sCompile)"
)
matches = re.findall(cheat_regex, self._log_text)
if matches:
cheats = [f" {match}" for match in matches]