deploy: 3662499a4f
parent
70005bc0eb
commit
04a53ab0a6
29
fx_core.js
29
fx_core.js
|
@ -1,6 +1,6 @@
|
||||||
const dictionary = {"gIsTeamGame":"iA","game":"df","playerId":"du","playerData":"dV","playerNames":"hY","rawPlayerNames":"ih","playerBalances":"l5","playerTerritories":"ev","gameState":"gP","fontSize":"fontSize","x":"a7","y":"a8","canvas":"ko","gHumans":"dg","playerStates":"qh","fontGeneratorFunction":"q.r.ft","gIsSingleplayer":"iP","gLobbyMaxJoin":"iG","SingleplayerMenu":"gM","getSingleplayerPlayerCount":"a6E","gMaxPlayers":"eM","gBots":"nX","Translations":"e","txt":"f","strs":"a05","uiSizes":"b2","gap":"gap","i":"a6"};
|
const dictionary = {"gIsTeamGame":"iA","game":"df","playerId":"du","playerData":"dV","playerNames":"hY","rawPlayerNames":"ih","playerBalances":"l5","playerTerritories":"ev","gameState":"gP","fontSize":"fontSize","x":"a7","y":"a8","canvas":"ko","gHumans":"dg","playerStates":"qh","fontGeneratorFunction":"q.r.ft","gIsSingleplayer":"iP","gLobbyMaxJoin":"iG","SingleplayerMenu":"gM","getSingleplayerPlayerCount":"a6E","gMaxPlayers":"eM","gBots":"nX","Translations":"e","txt":"f","strs":"a05","uiSizes":"b2","gap":"gap","i":"a6"};
|
||||||
const fx_version = '0.6.5'; // FX Client Version
|
const fx_version = '0.6.5.1'; // FX Client Version
|
||||||
const fx_update = 'Jul 5'; // FX Client Last Updated
|
const fx_update = 'Jul 12'; // 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;
|
||||||
|
@ -133,6 +133,7 @@ var settings = {
|
||||||
"showPlayerDensity": true,
|
"showPlayerDensity": true,
|
||||||
"coloredDensity": true,
|
"coloredDensity": true,
|
||||||
"densityDisplayStyle": "percentage",
|
"densityDisplayStyle": "percentage",
|
||||||
|
"highlightClanSpawns": false,
|
||||||
//"customMapFileBtn": true
|
//"customMapFileBtn": true
|
||||||
"customBackgroundUrl": "",
|
"customBackgroundUrl": "",
|
||||||
"attackPercentageKeybinds": [],
|
"attackPercentageKeybinds": [],
|
||||||
|
@ -141,10 +142,9 @@ const discontinuedSettings = [ "hideAllLinks", "fontName" ];
|
||||||
let makeMainMenuTransparent = false;
|
let makeMainMenuTransparent = false;
|
||||||
var settingsManager = new (function() {
|
var settingsManager = new (function() {
|
||||||
const settingsStructure = [
|
const settingsStructure = [
|
||||||
//{ for: "fontName", type: "textInput", label: "Font name:", placeholder: "Enter font name", tooltip: "Name of the font to be used for rendering. For example: Arial, Georgia, sans-serif, serif, Comic Sans MS, ..."},
|
|
||||||
{ type: "button", text: "Reset Wins Counter", action: removeWins },
|
|
||||||
{ for: "displayWinCounter", type: "checkbox", label: "Display win counter",
|
{ for: "displayWinCounter", type: "checkbox", label: "Display win counter",
|
||||||
note: "The win counter tracks multiplayer solo wins (not in team games)" },
|
note: "The win counter tracks multiplayer solo wins (not in team games)" },
|
||||||
|
{ type: "button", text: "Reset win counter", action: removeWins },
|
||||||
{ for: "useFullscreenMode", type: "checkbox", label: "Use fullscreen mode",
|
{ for: "useFullscreenMode", type: "checkbox", label: "Use fullscreen mode",
|
||||||
note: "Note: fullscreen mode will trigger after you click anywhere on the page due to browser policy restrictions." },
|
note: "Note: fullscreen mode will trigger after you click anywhere on the page due to browser policy restrictions." },
|
||||||
{ for: "hoveringTooltip", type: "checkbox", label: "Hovering tooltip",
|
{ for: "hoveringTooltip", type: "checkbox", label: "Hovering tooltip",
|
||||||
|
@ -157,6 +157,8 @@ var settingsManager = new (function() {
|
||||||
{ 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)" }
|
||||||
]},
|
]},
|
||||||
|
{ for: "highlightClanSpawns", type: "checkbox", label: "Highlight clan spawnpoints",
|
||||||
|
note: "Increases the spawnpoint glow size for members of your clan" },
|
||||||
{ for: "customBackgroundUrl", type: "textInput", label: "Custom main menu background:", placeholder: "Enter an image URL here", tooltip: "A custom image to be shown as the main menu background instead of the currently selected map." },
|
{ for: "customBackgroundUrl", type: "textInput", label: "Custom main menu background:", placeholder: "Enter an image URL here", tooltip: "A custom image to be shown as the main menu background instead of the currently selected map." },
|
||||||
KeybindsInput
|
KeybindsInput
|
||||||
];
|
];
|
||||||
|
@ -464,9 +466,10 @@ const leaderboardFilter = new (function() {
|
||||||
};
|
};
|
||||||
this.filterByOwnClan = () => {
|
this.filterByOwnClan = () => {
|
||||||
this.playersToInclude = [];
|
this.playersToInclude = [];
|
||||||
const ownClan = this.parseClanFromPlayerName(getVar("rawPlayerNames")[getVar("playerId")]);
|
const playerId = getVar("playerId");
|
||||||
|
const ownClan = this.parseClanFromPlayerName(getVar("rawPlayerNames")[playerId]);
|
||||||
getVar("rawPlayerNames").forEach((name, id) => {
|
getVar("rawPlayerNames").forEach((name, id) => {
|
||||||
if (this.parseClanFromPlayerName(name) === ownClan) this.playersToInclude.push(id);
|
if (id === playerId || this.parseClanFromPlayerName(name) === ownClan) this.playersToInclude.push(id);
|
||||||
});
|
});
|
||||||
this.enabled = true;
|
this.enabled = true;
|
||||||
this.scrollToTop();
|
this.scrollToTop();
|
||||||
|
@ -475,6 +478,20 @@ const leaderboardFilter = new (function() {
|
||||||
this.reset = () => {
|
this.reset = () => {
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
this.selectedTab = 0;
|
this.selectedTab = 0;
|
||||||
|
clanFilter.refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const clanFilter = new (function() {
|
||||||
|
this.inOwnClan = new Array(512);
|
||||||
|
this.inOwnClan.fill(false);
|
||||||
|
this.refresh = () => {
|
||||||
|
const gHumans = getVar("gHumans");
|
||||||
|
const ownClan = leaderboardFilter.parseClanFromPlayerName(getVar("rawPlayerNames")[getVar("playerId")]);
|
||||||
|
if (ownClan === null) this.inOwnClan.fill(false);
|
||||||
|
else getVar("rawPlayerNames").forEach((name, id) => {
|
||||||
|
this.inOwnClan[id] = id < gHumans && leaderboardFilter.parseClanFromPlayerName(name) === ownClan;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
11
game.js
11
game.js
|
@ -1422,8 +1422,11 @@ function io() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function p7(a6, ko, km, gv) {
|
function p7(a6, ko, km, gv) {
|
||||||
var a7;
|
var a7, y, highlight = settings.highlightClanSpawns && clanFilter.inOwnClan[a6];
|
||||||
0 !== dV.eg[a6] && 0 !== dV.ev[a6] && (a7 = dV.nu[a6] + dV.nw[a6] + 1 - gv - 2 >> 1, gv = dV.nv[a6] + dV.nx[a6] + 1 - gv - 2 >> 1, ko.drawImage(km[df.iA ? lV.i6[a6] : a6 < df.dg ? 1 : 0], a7, gv))
|
if (highlight) gv *= 2;
|
||||||
|
0 !== dV.eg[a6] && 0 !== dV.ev[a6] && (a7 = dV.nu[a6] + dV.nw[a6] + 1 - gv - 2 >> 1, y = dV.nv[a6] + dV.nx[a6] + 1 - gv - 2 >> 1,
|
||||||
|
highlight ? ko.drawImage(km[df.iA ? lV.i6[a6] : a6 < df.dg ? 1 : 0], a7, y, gv, gv) :
|
||||||
|
ko.drawImage(km[df.iA ? lV.i6[a6] : a6 < df.dg ? 1 : 0], a7, y))
|
||||||
}
|
}
|
||||||
this.m = function() {
|
this.m = function() {
|
||||||
var oZ;
|
var oZ;
|
||||||
|
@ -5880,8 +5883,10 @@ function ip() {
|
||||||
es = gf.d4.ot * cz,
|
es = gf.d4.ot * cz,
|
||||||
ov = gf.d4.ov;
|
ov = gf.d4.ov;
|
||||||
for (let a6 = df.dg - 1; 0 <= a6; a6--) ! function(a6, es, bK, hP, hQ, hR, ov) {
|
for (let a6 = df.dg - 1; 0 <= a6; a6--) ! function(a6, es, bK, hP, hQ, hR, ov) {
|
||||||
|
var highlight = settings.highlightClanSpawns && clanFilter.inOwnClan[a6];
|
||||||
|
if (highlight) es *= 2;
|
||||||
0 === dV.eg[a6] || 0 === dV.ev[a6] || (hQ = ay.ak * ((dV.nu[a6] + dV.nw[a6] + 1) / 2 - bK) / (hQ - bK) - .5 * es, bK = ay.al * ((dV.nv[a6] + dV.nx[a6] + 1) / 2 - hP) / (hR - hP) - .5 * es, hQ > ay.ak) || bK > ay.al || hQ < -
|
0 === dV.eg[a6] || 0 === dV.ev[a6] || (hQ = ay.ak * ((dV.nu[a6] + dV.nw[a6] + 1) / 2 - bK) / (hQ - bK) - .5 * es, bK = ay.al * ((dV.nv[a6] + dV.nx[a6] + 1) / 2 - hP) / (hR - hP) - .5 * es, hQ > ay.ak) || bK > ay.al || hQ < -
|
||||||
es || bK < -es || (bI.setTransform(cz, 0, 0, cz, hQ, bK), bI.drawImage(ov[df.iA ? lV.i6[a6] : 1], 0, 0))
|
es || bK < -es || (bI.setTransform(highlight ? cz * 2 : cz, 0, 0, highlight ? cz * 2 : cz, hQ, bK), bI.drawImage(ov[df.iA ? lV.i6[a6] : 1], 0, 0))
|
||||||
}(a6, es, bK, hP, hQ, hR, ov);
|
}(a6, es, bK, hP, hQ, hR, ov);
|
||||||
bI.setTransform(cz, 0, 0, cz, 0, 0)
|
bI.setTransform(cz, 0, 0, cz, 0, 0)
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,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?1720602379194">
|
<link rel="stylesheet" href="main.css?1720804536901">
|
||||||
<!-- Game CSS -->
|
<!-- Game CSS -->
|
||||||
<style>
|
<style>
|
||||||
html,
|
html,
|
||||||
|
@ -124,8 +124,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?1720602379194"></script>
|
<script src="variables.js?1720804536901"></script>
|
||||||
<script src="fx_core.js?1720602379194"></script>
|
<script src="fx_core.js?1720804536901"></script>
|
||||||
<script src="game.js?1720602379194"></script>
|
<script src="game.js?1720804536901"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue