From a02d49782d4fb0d75f664c370fc5995c18c910cc Mon Sep 17 00:00:00 2001 From: peshomir <80340328+peshomir@users.noreply.github.com> Date: Thu, 6 Feb 2025 12:51:36 +0200 Subject: [PATCH] Add an option to show detailed percentages on the team pie chart --- patches.js | 4 ++++ src/main.js | 4 ++-- src/settings.js | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/patches.js b/patches.js index f189941..df190ba 100644 --- a/patches.js +++ b/patches.js @@ -362,6 +362,10 @@ canvas.font=aY.g0.g1(1,fontSize),canvas.fillStyle="rgba("+gR+","+tD+","+hj+",0.6 this.maxPlayers=this.gLobbyMaxJoin,this.gBots=this.gLobbyMaxJoin-this.gHumans,this.sg=0,`) } + // Detailed team pie chart percentage + replaceRawCode(`qr=Math.floor(100*f0+.5)+"%"`, + `qr = (__fx.settings.detailedTeamPercentage ? (100*f0).toFixed(2) : Math.floor(100*f0+.5)) + "%"`) + // Invalid hostname detection avoidance replaceRawCode(`,hostnameIsValid=0<=window.location.hostname.toLowerCase().indexOf("territorial.io"),`, `,hostnameIsValid=true,`) diff --git a/src/main.js b/src/main.js index 6f4bd22..b6a6b43 100644 --- a/src/main.js +++ b/src/main.js @@ -1,5 +1,5 @@ -const fx_version = '0.6.6.16'; // FX Client Version -const fx_update = 'Feb 3'; // FX Client Last Updated +const fx_version = '0.6.6.17'; // FX Client Version +const fx_update = 'Feb 6'; // FX Client Last Updated import settingsManager from './settings.js'; import { clanFilter, leaderboardFilter } from "./clanFilters.js"; diff --git a/src/settings.js b/src/settings.js index 38ef4c3..52654fd 100644 --- a/src/settings.js +++ b/src/settings.js @@ -18,6 +18,7 @@ var settings = { densityDisplayStyle: "percentage", hideBotNames: false, highlightClanSpawns: false, + detailedTeamPercentage: false, //"customMapFileBtn": true customBackgroundUrl: "", attackPercentageKeybinds: [], @@ -87,6 +88,11 @@ const settingsManager = new (function () { label: "Highlight clan spawnpoints", note: "Increases the spawnpoint glow size for members of your clan", }, + { + for: "detailedTeamPercentage", type: "checkbox", + label: "Detailed team pie chart percentage", + note: "For example: this would show 25.82% instead of 26% on the pie chart in team games" + }, { for: "customBackgroundUrl", type: "textInput",