SquadJS/squad-server/log-parser/deployable-damaged.js

22 lines
688 B
JavaScript
Raw Normal View History

2021-02-03 16:31:38 -06:00
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.]+)/,
2021-02-03 16:31:38 -06:00
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.session[args[3]] = data;
2021-02-03 16:31:38 -06:00
2021-02-03 17:30:54 -06:00
logParser.emit('DEPLOYABLE_DAMAGED', data);
2021-02-03 16:31:38 -06:00
}
};