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
This commit is contained in:
parent
e1316076bf
commit
510deb04e7
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue