mirror of
https://github.com/ershisan99/www.git
synced 2025-12-18 21:09:23 +00:00
add new events to log parser
This commit is contained in:
@@ -315,6 +315,20 @@ export default function LogParser() {
|
|||||||
type: 'event',
|
type: 'event',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
} else if (line.includes('boughtCardFromShop')) {
|
||||||
|
const match = line.match(/card:([^,\n]+)/i)
|
||||||
|
if (match) {
|
||||||
|
const raw = match[1] ? match[1].trim() : ''
|
||||||
|
const clean = raw.replace(/^(c_mp_|j_mp_)/, '')
|
||||||
|
lines.push({ text: `Bought ${clean}`, type: 'event' })
|
||||||
|
}
|
||||||
|
} else if (line.includes('rerollShop')) {
|
||||||
|
const match = line.match(/cost:([^,\n]+)/i)
|
||||||
|
if (match) {
|
||||||
|
const cost = match[1] ? match[1].trim() : ''
|
||||||
|
|
||||||
|
lines.push({ text: `Reroll for $${cost}`, type: 'event' })
|
||||||
|
}
|
||||||
} else if (lineLower.includes('usedcard')) {
|
} else if (lineLower.includes('usedcard')) {
|
||||||
const match = line.match(/card:([^,\n]+)/i)
|
const match = line.match(/card:([^,\n]+)/i)
|
||||||
if (match) {
|
if (match) {
|
||||||
|
|||||||
Reference in New Issue
Block a user