gh-pages
peshomir 2024-03-30 13:56:48 +00:00
parent ae3c31d477
commit 51a837c3b2
3 changed files with 16 additions and 9 deletions

View File

@ -1,6 +1,6 @@
const dictionary = {"gIsTeamGame":"hN","playerId":"eW","playerNames":"jm","playerBalances":"eX","playerTerritories":"f1","gHumans":"h2","playerStates":"h4","gLobbyMaxJoin":"pS","gIsSingleplayer":"io","uiSizes":"b0","gap":"gap"}; const dictionary = {"gIsTeamGame":"hN","playerId":"eW","playerNames":"jm","playerBalances":"eX","playerTerritories":"f1","gHumans":"h2","playerStates":"h4","gLobbyMaxJoin":"pS","gIsSingleplayer":"io","uiSizes":"b0","gap":"gap"};
const fx_version = '0.6.3'; // FX Client Version const fx_version = '0.6.3.1'; // FX Client Version
const fx_update = 'Mar 26'; // FX Client Last Updated const fx_update = 'Mar 30'; // FX Client Last Updated
if (localStorage.getItem("fx_winCount") == undefined || localStorage.getItem("fx_winCount") == null) { if (localStorage.getItem("fx_winCount") == undefined || localStorage.getItem("fx_winCount") == null) {
var wins_counter = 0; var wins_counter = 0;
@ -108,6 +108,7 @@ var settings = {
//"hideAllLinks": false, //"hideAllLinks": false,
"realisticNames": false, "realisticNames": false,
"showPlayerDensity": true, "showPlayerDensity": true,
"coloredDensity": true,
"densityDisplayStyle": "percentage", "densityDisplayStyle": "percentage",
//"customMapFileBtn": true //"customMapFileBtn": true
"customBackgroundUrl": "", "customBackgroundUrl": "",
@ -124,6 +125,7 @@ var settingsManager = new (function() {
//{ for: "hideAllLinks", type: "checkbox", label: "Hide Links option also hides app store links" }, //{ for: "hideAllLinks", type: "checkbox", label: "Hide Links option also hides app store links" },
{ for: "realisticNames", type: "checkbox", label: "Realistic Bot Names" }, { for: "realisticNames", type: "checkbox", label: "Realistic Bot Names" },
{ for: "showPlayerDensity", type: "checkbox", label: "Show player density" }, { for: "showPlayerDensity", type: "checkbox", label: "Show player density" },
{ for: "coloredDensity", type: "checkbox", label: "Colored density", note: "Display the density with a color between red and green depending on the density value" },
{ for: "densityDisplayStyle", type: "selectMenu", label: "Density value display style:", tooltip: "Controls how the territorial density value should be rendered", options: [ { for: "densityDisplayStyle", type: "selectMenu", label: "Density value display style:", tooltip: "Controls how the territorial density value should be rendered", options: [
{ value: "percentage", label: "Percentage" }, { value: "percentage", label: "Percentage" },
{ value: "absoluteQuotient", label: "Value from 0 to 150 (BetterTT style)" } { value: "absoluteQuotient", label: "Value from 0 to 150 (BetterTT style)" }
@ -379,6 +381,10 @@ var utils = new (function() {
const lineHeight = parseInt(canvas.font.split(" ").find(part => part.endsWith("px")).slice(0, -2)); const lineHeight = parseInt(canvas.font.split(" ").find(part => part.endsWith("px")).slice(0, -2));
text.split("\n").forEach((line, index) => canvas.fillText(line, x, y + index * lineHeight, maxWidth)); text.split("\n").forEach((line, index) => canvas.fillText(line, x, y + index * lineHeight, maxWidth));
} }
this.textStyleBasedOnDensity = function(playerID) {
const playerBalances = getVar("playerBalances"), playerTerritories = getVar("playerTerritories");
return `hsl(${playerBalances[playerID] / (playerTerritories[playerID] * 1.5)}, 100%, 50%, 1)`;
}
}); });
const keybindFunctions = { setAbsolute: () => {}, setRelative: () => {} }; const keybindFunctions = { setAbsolute: () => {}, setRelative: () => {} };

View File

@ -5014,12 +5014,13 @@ function bo() {
gP.drawImage(ja, 0, 0), gP.globalAlpha = 1, gP.setTransform(1, 0, 0, 1, 0, 0) gP.drawImage(ja, 0, 0), gP.globalAlpha = 1, gP.setTransform(1, 0, 0, 1, 0, 0)
}(jZ, ja, fontSize, iM, eF, vw, a7t[eF + iM * ef], gP), vw -= 2) }(jZ, ja, fontSize, iM, eF, vw, a7t[eF + iM * ef], gP), vw -= 2)
}(jZ, ja, fontSize, eF, gP), (jb = a7i * fontSize) < a7k || (gP.font = aY.g0.g1(1, jb), b9.dF.data[7].value ? a8G(eF, jb, jZ, ja + .78 * fontSize, gP) : (gP.fillText(aY.jk.jl(eX[eF]), jZ, ja + .78 * fontSize), settings }(jZ, ja, fontSize, eF, gP), (jb = a7i * fontSize) < a7k || (gP.font = aY.g0.g1(1, jb), b9.dF.data[7].value ? a8G(eF, jb, jZ, ja + .78 * fontSize, gP) : (gP.fillText(aY.jk.jl(eX[eF]), jZ, ja + .78 * fontSize), settings
.showPlayerDensity && gP.fillText(utils.getDensity(eF), jZ, ja + fontSize * 1.5)))) .showPlayerDensity && (settings.coloredDensity && (gP.fillStyle = utils.textStyleBasedOnDensity(eF)), gP.fillText(utils.getDensity(eF), jZ, ja + fontSize * 1.5)))))
} }
function a8G(eF, fontSize, fK, fL, gP) { function a8G(eF, fontSize, fK, fL, gP) {
gP.fillText(jm[eF], fK, fL), b9.dF.data[7].value && settings.showPlayerDensity && gP.fillText(utils.getDensity(eF), fK, fL + fontSize), eF < h2 && 2 !== h4[eF] || (eF = fontSize / a7f[eF], gP.fillRect(fK - .5 * eF, fL + aY.g0.tC * fontSize, var ___id = eF;
eF, Math.max(1, .1 * fontSize))) gP.fillText(jm[eF], fK, fL), eF < h2 && 2 !== h4[eF] || (eF = fontSize / a7f[eF], gP.fillRect(fK - .5 * eF, fL + aY.g0.tC * fontSize, eF, Math.max(1, .1 * fontSize)));
b9.dF.data[7].value && settings.showPlayerDensity && (settings.coloredDensity && (gP.fillStyle = utils.textStyleBasedOnDensity(___id)), gP.fillText(utils.getDensity(___id), fK, fL + fontSize));
} }
function a8I(jZ, ja, fontSize, a8L, a8M, gP) { function a8I(jZ, ja, fontSize, a8L, a8M, gP) {

View File

@ -34,7 +34,7 @@
<meta itemprop="image" content="https://fxclient.github.io/FXclient/assets/logo.png"> <meta itemprop="image" content="https://fxclient.github.io/FXclient/assets/logo.png">
<!-- FX Client CSS --> <!-- FX Client CSS -->
<link rel="stylesheet" href="main.css?1711802892605"> <link rel="stylesheet" href="main.css?1711807006594">
<!-- Game CSS --> <!-- Game CSS -->
<style> <style>
html, html,
@ -121,8 +121,8 @@
<p id="donationhistory_note">Note: donations from bots are not shown here</p> <p id="donationhistory_note">Note: donations from bots are not shown here</p>
<table><tbody id="donationhistory_content"></tbody></table> <table><tbody id="donationhistory_content"></tbody></table>
</div> </div>
<script src="variables.js?1711802892605"></script> <script src="variables.js?1711807006594"></script>
<script src="fx_core.js?1711802892605"></script> <script src="fx_core.js?1711807006594"></script>
<script src="game.js?1711802892605"></script> <script src="game.js?1711807006594"></script>
</body> </body>
</html> </html>