diff --git a/package.json b/package.json index 7577aad..14d6540 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dayzr-bot", - "version": "10.3.3", + "version": "10.3.4", "description": "A General Purpose Discord Bot for DayZ Nitrado Servers.", "main": "index.js", "nodemonConfig": { diff --git a/util/AdminLogsHandler.js b/util/AdminLogsHandler.js index e56f3e2..efcd9ae 100644 --- a/util/AdminLogsHandler.js +++ b/util/AdminLogsHandler.js @@ -62,11 +62,11 @@ module.exports = { destination_dir = dir; } } - const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : tempDest; + const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : `Near ${tempDest}`; let combatLog = new EmbedBuilder() .setColor(client.config.Colors.Red) - .setDescription(`**NOTICE:**\n**${data.player}** has combat logged at when fighting **${data.lastHitBy}\nLocation [${data.pos[0]}, ${data.pos[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${data.pos[0]};${data.pos[1]})**\nNear ${destination}`); + .setDescription(`**NOTICE:**\n**${data.player}** has combat logged at when fighting **${data.lastHitBy}\nLocation [${data.pos[0]}, ${data.pos[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${data.pos[0]};${data.pos[1]})**\n${destination}`); if (client.exists(guild.adminRole)) channel.send({ content: `<@&${guild.adminRole}>` }); diff --git a/util/AlarmsHandler.js b/util/AlarmsHandler.js index fd313b3..c6c8cc6 100644 --- a/util/AlarmsHandler.js +++ b/util/AlarmsHandler.js @@ -36,11 +36,11 @@ const HandlePlayerTrackEvent = async (client, guild, e) => { destination_dir = dir; } } - const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : tempDest; + const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : `Near ${tempDest}`; const trackEvent = new EmbedBuilder() .setColor(client.config.Colors.Default) - .setDescription(`**${e.name} Event**\n${e.gamertag} was located at **[${player.pos[0]}, ${player.pos[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${player.pos[0]};${player.pos[1]})** at \nNear ${destination}`); + .setDescription(`**${e.name} Event**\n${e.gamertag} was located at **[${player.pos[0]}, ${player.pos[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${player.pos[0]};${player.pos[1]})** at \n${destination}`); if (!client.exists(e.channel)) return ExpireEvent(client, guild, e); // Expire event since it has invalid channel. const channel = client.GetChannel(e.channel); @@ -123,11 +123,11 @@ module.exports = { destination_dir = dir; } } - const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : tempDest; + const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : `Near ${tempDest}`; let uavEmbed = new EmbedBuilder() .setColor(client.config.Colors.Default) - .setDescription(`**UAV Detection - **\n**${data.player}** was spotted in the UAV zone at **[${data.pos[0]}, ${data.pos[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${data.pos[0]};${data.pos[1]})\nNear ${destination}**`) + .setDescription(`**UAV Detection - **\n**${data.player}** was spotted in the UAV zone at **[${data.pos[0]}, ${data.pos[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${data.pos[0]};${data.pos[1]})\n${destination}**`) client.users.fetch(uav.owner, false).then((user) => { user.send({ embeds: [uavEmbed] }); diff --git a/util/KillfeedHandler.js b/util/KillfeedHandler.js index a9d4e7f..aeba1d3 100644 --- a/util/KillfeedHandler.js +++ b/util/KillfeedHandler.js @@ -90,11 +90,11 @@ module.exports = { } } - const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : tempDest; + const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : `Near ${tempDest}`; if (killedBy == Templates.LandMine || killedBy == Templates.Explosion || killedBy == Templates.Vehicle) { const cod = killedBy == Templates.LandMine ? `Land Mine Trap` : 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]})***\nNear ${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 killEvent = new EmbedBuilder() @@ -184,7 +184,7 @@ module.exports = { if (victimStatIndex == -1) stats.push(victimStat); else stats[victimStatIndex] = victimStat; - const coord = showCoords ? `\n***Location [${info.victimPOS[0]}, ${info.victimPOS[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${info.victimPOS[0]};${info.victimPOS[1]})***\nNear ${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 killEvent = new EmbedBuilder() .setColor(client.config.Colors.Default) diff --git a/util/vector.js b/util/vector.js index 4b68d74..cfa3769 100644 --- a/util/vector.js +++ b/util/vector.js @@ -4,8 +4,8 @@ module.exports = { let distance = parseFloat(Math.sqrt(Math.pow(delta[0], 2) + Math.pow(delta[1], 2)).toFixed(0)); let thetat = Math.round(Math.atan2(delta[0], delta[1]) / Math.PI * 180); let theta = (thetat < 0) ? (360 + thetat) : thetat; - let compass = ["S", "S.SW", "SW", "W.SW", "W", "W.NW", "NW", "N.NW", "N", "N.NE", "NE", "E.NE", "E", "E.SE", "SE", "S.SE", "S"]; - let dir = compass[Math.round(theta / 22.5)]; + let compass = ["S", "SW", "W", "NW", "N", "N by NE", "NE", "E", "SE", "S"]; + let dir = compass[Math.round(theta / 45)]; return {distance, theta, dir} }