update/better killfeed vehicle death message

This commit is contained in:
SowinskiBraeden committed 2023-10-07 16:04:26 -07:00
1 parent 80534aa05d
commit 941f2ba3bd
2 files changed
+31 -8

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "dayzr-bot", "name": "dayzr-bot",
"version": "10.3.4", "version": "10.3.5",
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.", "description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
"main": "index.js", "main": "index.js",
"nodemonConfig": { "nodemonConfig": {
+30 -7
View File
@@ -5,15 +5,37 @@ const { destinations } = require('../config/destinations');
const { calculateVector } = require('./vector'); const { calculateVector } = require('./vector');
const Templates = { const Templates = {
Killed: 1, Killed: 1,
HitBy: 2, HitBy: 2,
HitByAndDead: 3, HitByAndDead: 3,
Explosion: 4, Explosion: 4,
LandMine: 5, LandMine: 5,
Melee: 6, Melee: 6,
Vehicle: 7, Vehicle: 7,
}; };
const Vehicles = {
CivilianSedan: 'White Olga',
CivilianSedan_Black: 'Black Olga',
CivilianSedan_Wine: 'Wine Olga',
Hatchback_02: 'Red Gunter',
Hatchback_02_Black: 'Black Gunter',
Hatchback_02_Blue: 'Blue Gunter',
OffroadHatchBack: 'Green ADA 4x4',
OffroadHatchBack_Blue: 'Blue ADA 4x4',
OffroadHatchBack_White: 'White ADA 4x4',
Sedan_02: 'Yellow Sarka',
Sedan_02_Grey: 'Grey Sarka',
Sedan_02_Red: 'Red Sarka',
Truck_01_Covered: 'Green V3S Truck',
Truck_01_Covered_Blue: 'Blue V3S Truck',
Truck_01_Covered_Orange: 'Orange V3S Truck',
}
module.exports = { module.exports = {
HandleKillfeed: async (client, guildId, stats, line) => { HandleKillfeed: async (client, guildId, stats, line) => {
@@ -93,7 +115,8 @@ module.exports = {
const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : `Near ${tempDest}`; const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : `Near ${tempDest}`;
if (killedBy == Templates.LandMine || killedBy == Templates.Explosion || killedBy == Templates.Vehicle) { if (killedBy == Templates.LandMine || killedBy == Templates.Explosion || killedBy == Templates.Vehicle) {
const cod = killedBy == Templates.LandMine ? `Land Mine Trap` : info.causeOfDeath; const cod = killedBy == Templates.LandMine ? `Land Mine Trap` :
killedBy == Templates.Vehicle ? Vehicles[info.causeOfDeath] : info.causeOfDeath;
const coord = showCoords ? `\n***Location [${info.victimPOS[0]}, ${info.victimPOS[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${info.victimPOS[0]};${info.victimPOS[1]})***\n${destination}` : ''; const coord = showCoords ? `\n***Location [${info.victimPOS[0]}, ${info.victimPOS[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${info.victimPOS[0]};${info.victimPOS[1]})***\n${destination}` : '';
const killMessage = killedBy == Templates.Vehicle ? 'run over by' : 'blew up from'; const killMessage = killedBy == Templates.Vehicle ? 'run over by' : 'blew up from';