deploy: 5aa22162a6
parent
ae3c31d477
commit
51a837c3b2
10
fx_core.js
10
fx_core.js
|
@ -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 fx_version = '0.6.3'; // FX Client Version
|
||||
const fx_update = 'Mar 26'; // FX Client Last Updated
|
||||
const fx_version = '0.6.3.1'; // FX Client Version
|
||||
const fx_update = 'Mar 30'; // FX Client Last Updated
|
||||
|
||||
if (localStorage.getItem("fx_winCount") == undefined || localStorage.getItem("fx_winCount") == null) {
|
||||
var wins_counter = 0;
|
||||
|
@ -108,6 +108,7 @@ var settings = {
|
|||
//"hideAllLinks": false,
|
||||
"realisticNames": false,
|
||||
"showPlayerDensity": true,
|
||||
"coloredDensity": true,
|
||||
"densityDisplayStyle": "percentage",
|
||||
//"customMapFileBtn": true
|
||||
"customBackgroundUrl": "",
|
||||
|
@ -124,6 +125,7 @@ var settingsManager = new (function() {
|
|||
//{ for: "hideAllLinks", type: "checkbox", label: "Hide Links option also hides app store links" },
|
||||
{ for: "realisticNames", type: "checkbox", label: "Realistic Bot Names" },
|
||||
{ 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: [
|
||||
{ value: "percentage", label: "Percentage" },
|
||||
{ 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));
|
||||
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: () => {} };
|
||||
|
|
7
game.js
7
game.js
|
@ -5014,12 +5014,13 @@ function bo() {
|
|||
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, 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) {
|
||||
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,
|
||||
eF, Math.max(1, .1 * fontSize)))
|
||||
var ___id = eF;
|
||||
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) {
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<meta itemprop="image" content="https://fxclient.github.io/FXclient/assets/logo.png">
|
||||
|
||||
<!-- FX Client CSS -->
|
||||
<link rel="stylesheet" href="main.css?1711802892605">
|
||||
<link rel="stylesheet" href="main.css?1711807006594">
|
||||
<!-- Game CSS -->
|
||||
<style>
|
||||
html,
|
||||
|
@ -121,8 +121,8 @@
|
|||
<p id="donationhistory_note">Note: donations from bots are not shown here</p>
|
||||
<table><tbody id="donationhistory_content"></tbody></table>
|
||||
</div>
|
||||
<script src="variables.js?1711802892605"></script>
|
||||
<script src="fx_core.js?1711802892605"></script>
|
||||
<script src="game.js?1711802892605"></script>
|
||||
<script src="variables.js?1711807006594"></script>
|
||||
<script src="fx_core.js?1711807006594"></script>
|
||||
<script src="game.js?1711807006594"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue