mirror of
https://github.com/AsgardEternal/SquadJS.git
synced 2024-09-28 23:24:26 -05:00
21 lines
676 B
JavaScript
21 lines
676 B
JavaScript
export default {
|
|
regex: /^\[([0-9.:-]+)]\[([ 0-9]*)]LogSquadTrace: \[DedicatedServer](?:ASQDeployable::)?TakeDamage\(\): ([A-z0-9_]+)_C_[0-9]+: ([0-9.]+) damage attempt by causer ([A-z0-9_]+)_C_[0-9]+ instigator (.+) with damage type ([A-z0-9_]+)_C health remaining ([0-9.]+)/,
|
|
onMatch: (args, logParser) => {
|
|
const data = {
|
|
raw: args[0],
|
|
time: args[1],
|
|
chainID: args[2],
|
|
deployable: args[3],
|
|
damage: parseFloat(args[4]),
|
|
weapon: args[5],
|
|
playerSuffix: args[6],
|
|
damageType: args[7],
|
|
healthRemaining: args[8]
|
|
};
|
|
|
|
logParser.eventStore[args[3]] = data;
|
|
|
|
logParser.emit('DEPLOYABLE_DAMAGED', data);
|
|
}
|
|
};
|