From 510deb04e7b91081158837eece495de9635ab901 Mon Sep 17 00:00:00 2001 From: LemonNexus Date: Sun, 8 Feb 2026 22:22:08 +0000 Subject: [PATCH] fix(log_watcher): update loot pattern for English format - Match [System]: with optional colon - Match item names with optional brackets [Shrapnel] - Fixes loot not being detected in user's log format --- core/log_watcher.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/log_watcher.py b/core/log_watcher.py index ec4ae9e..967f932 100644 --- a/core/log_watcher.py +++ b/core/log_watcher.py @@ -39,12 +39,12 @@ class LogWatcher: # ======================================================================== # LOOT PATTERNS - # English: "You received Shrapnel x 123 (Value: 1.23 PED)" + # English: "You received [Shrapnel] x (67) Value: 0.0067 PED" + # English alt: "You received Shrapnel x 123 (Value: 1.23 PED)" # Swedish: "Du fick Shrapnel x (4627) Värde: 0.4627 PED" - # English loot: "You received Animal Oil Residue x (2) Value: 0.0 PED" PATTERN_LOOT_EN = re.compile( - r'^(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s+\[System\]\s+\[?\]?\s*' - r'You\s+received\s+([\w\s]+?)\s+x\s*\((\d+)\)\s*' + r'^(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s+\[System\]:?\s*\[?\]?\s*' + r'You\s+received\s+\[?([\w\s\-()]+?)\]?\s+x\s*\((\d+)\)\s*' r'Value:\s+(\d+(?:\.\d+)?)\s+PED', re.IGNORECASE )