Compare commits
2 Commits
7db2006faf
...
b40b06f683
Author | SHA1 | Date |
---|---|---|
peshomir | b40b06f683 | |
peshomir | de92366e0c |
18
fx_core.js
18
fx_core.js
|
@ -1,6 +1,6 @@
|
||||||
const dictionary = {"gIsTeamGame":"hX","game":"b","playerId":"ed","playerData":"a8","playerNames":"jx","rawPlayerNames":"xb","playerBalances":"ee","playerTerritories":"f8","gLobbyMaxJoin":"qD","gMaxPlayers":"em","gIsSingleplayer":"iy","gameState":"sK","fontSize":"fontSize","x":"fR","y":"fS","canvas":"gW","gHumans":"h9","playerStates":"hB","Translations":"aZ","txt":"nr","strs":"a1d","uiSizes":"b4","gap":"gap","i":"eM"};
|
const dictionary = {"gIsTeamGame":"hX","game":"b","playerId":"ed","playerData":"a8","playerNames":"jx","rawPlayerNames":"xb","playerBalances":"ee","playerTerritories":"f8","gLobbyMaxJoin":"qD","gMaxPlayers":"em","gIsSingleplayer":"iy","gameState":"sK","fontSize":"fontSize","x":"fR","y":"fS","canvas":"gW","gHumans":"h9","playerStates":"hB","Translations":"aZ","txt":"nr","strs":"a1d","uiSizes":"b4","gap":"gap","i":"eM"};
|
||||||
const fx_version = '0.6.4.3'; // FX Client Version
|
const fx_version = '0.6.4.5'; // FX Client Version
|
||||||
const fx_update = 'Jun 1'; // FX Client Last Updated
|
const fx_update = 'Jun 3'; // 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;
|
||||||
|
@ -350,8 +350,8 @@ const playerList = new (function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
const leaderboardFilter = new (function() {
|
const leaderboardFilter = new (function() {
|
||||||
this.playersToInclude = [0,1,8,20,24,30,32,42,50,69,200,400,500,510,511]; // for testing
|
//this.playersToInclude = [0,1,8,20,24,30,32,42,50,69,200,400,500,510,511]; // for testing
|
||||||
//this.playersToInclude = [];
|
this.playersToInclude = [];
|
||||||
this.tabLabels = ["ALL", "CLAN"];
|
this.tabLabels = ["ALL", "CLAN"];
|
||||||
// these get populated by the modified game code
|
// these get populated by the modified game code
|
||||||
this.filteredLeaderboard = [];
|
this.filteredLeaderboard = [];
|
||||||
|
@ -365,8 +365,8 @@ const leaderboardFilter = new (function() {
|
||||||
|
|
||||||
this.selectedTab = 0;
|
this.selectedTab = 0;
|
||||||
this.tabHovering = -1;
|
this.tabHovering = -1;
|
||||||
//this.enabled = false;
|
this.enabled = false;
|
||||||
this.enabled = true;
|
//this.enabled = true;
|
||||||
this.drawTabs = function(canvas, totalWidth, verticalOffset, colorForSelectedTab) {
|
this.drawTabs = function(canvas, totalWidth, verticalOffset, colorForSelectedTab) {
|
||||||
canvas.textBaseline = "middle";
|
canvas.textBaseline = "middle";
|
||||||
canvas.textAlign = "center";
|
canvas.textAlign = "center";
|
||||||
|
@ -406,9 +406,9 @@ const leaderboardFilter = new (function() {
|
||||||
return isHovering;
|
return isHovering;
|
||||||
}
|
}
|
||||||
this.handleMouseDown = (xRelative) => {
|
this.handleMouseDown = (xRelative) => {
|
||||||
//console.log("click; x: ", xRelative);
|
const tab = Math.floor(xRelative / (this.windowWidth / this.tabLabels.length));
|
||||||
if (this.tabHovering !== this.selectedTab) {
|
if (this.selectedTab !== tab) {
|
||||||
this.selectedTab = this.tabHovering;
|
this.selectedTab = tab;
|
||||||
if (this.selectedTab === 0) this.clearFilter();
|
if (this.selectedTab === 0) this.clearFilter();
|
||||||
else if (this.selectedTab === 1) this.filterByOwnClan();
|
else if (this.selectedTab === 1) this.filterByOwnClan();
|
||||||
this.repaintLeaderboard();
|
this.repaintLeaderboard();
|
||||||
|
|
33
game.js
33
game.js
|
@ -3236,6 +3236,16 @@ function bi() {
|
||||||
function bj() {
|
function bj() {
|
||||||
var a0m, a0n, a0o, a0p, a0q, a0r, a0s, a0t, a0u, a0v, a0w, a0x, a0y, a0z, a10, a11, a12, a13, a14, a15, a16, a17, position, a18, a19, a1A, a1B, a1C = 1,
|
var a0m, a0n, a0o, a0p, a0q, a0r, a0s, a0t, a0u, a0v, a0w, a0x, a0y, a0z, a10, a11, a12, a13, a14, a15, a16, a17, position, a18, a19, a1A, a1B, a1C = 1,
|
||||||
a1D = 1;
|
a1D = 1;
|
||||||
|
var leaderboardHasChanged = true;
|
||||||
|
this.playerPos = b.ed;
|
||||||
|
|
||||||
|
function updateFilteredLb() {
|
||||||
|
if (!leaderboardHasChanged) return;
|
||||||
|
leaderboardFilter.filteredLeaderboard = leaderboardFilter.playersToInclude
|
||||||
|
.map(id => a0l[id]).sort((a, b) => a - b);
|
||||||
|
leaderboardHasChanged = false;
|
||||||
|
this.playerPos = leaderboardFilter.filteredLeaderboard.indexOf(a0l[b.ed]);
|
||||||
|
}
|
||||||
|
|
||||||
function a1F() {
|
function a1F() {
|
||||||
a0s.clearRect(0, 0, a0m, yt),
|
a0s.clearRect(0, 0, a0m, yt),
|
||||||
|
@ -3243,15 +3253,11 @@ function bj() {
|
||||||
a0s.fillRect(0, 0, a0m, a0x),
|
a0s.fillRect(0, 0, a0m, a0x),
|
||||||
a0s.fillStyle = ad.kk,
|
a0s.fillStyle = ad.kk,
|
||||||
a0s.fillRect(0, a0x, a0m, yt - a0x);
|
a0s.fillRect(0, a0x, a0m, yt - a0x);
|
||||||
if (leaderboardFilter.enabled) {
|
if (leaderboardFilter.enabled) updateFilteredLb();
|
||||||
leaderboardFilter.filteredLeaderboard = leaderboardFilter.playersToInclude
|
|
||||||
.map(id => a0l[id]).sort((a, b) => a - b);
|
|
||||||
}
|
|
||||||
var playerPos = (leaderboardFilter.enabled ?
|
var playerPos = (leaderboardFilter.enabled ?
|
||||||
leaderboardFilter.filteredLeaderboard.indexOf(a0l[b.ed]) :
|
this.playerPos :
|
||||||
a0l[b.ed]
|
a0l[b.ed]
|
||||||
);
|
);
|
||||||
this.playerPos = playerPos;
|
|
||||||
if (leaderboardFilter.hoveringOverTabs) a17 = -1;
|
if (leaderboardFilter.hoveringOverTabs) a17 = -1;
|
||||||
if (leaderboardFilter.enabled && a17 >= leaderboardFilter.filteredLeaderboard.length) a17 = -1;
|
if (leaderboardFilter.enabled && a17 >= leaderboardFilter.filteredLeaderboard.length) a17 = -1;
|
||||||
playerPos >= position && a1G(playerPos - position, ad.l7),
|
playerPos >= position && a1G(playerPos - position, ad.l7),
|
||||||
|
@ -3364,7 +3370,8 @@ function bj() {
|
||||||
(eq != a0q - 2 || a14[a0q] === a0l[b.ed] && a15[a0q] === a8.f8[b.ed]) && (a16 = dh)
|
(eq != a0q - 2 || a14[a0q] === a0l[b.ed] && a15[a0q] === a8.f8[b.ed]) && (a16 = dh)
|
||||||
}();
|
}();
|
||||||
for (var eM = a0q - 1; 0 <= eM; eM--) a14[eM] = jR[eM], a15[eM] = a8.f8[jR[eM]];
|
for (var eM = a0q - 1; 0 <= eM; eM--) a14[eM] = jR[eM], a15[eM] = a8.f8[jR[eM]];
|
||||||
a14[a0q] = a0l[b.ed], a15[a0q] = a8.f8[b.ed]
|
a14[a0q] = a0l[b.ed], a15[a0q] = a8.f8[b.ed];
|
||||||
|
leaderboardHasChanged = true;
|
||||||
}, leaderboardFilter.scrollToTop = function() {
|
}, leaderboardFilter.scrollToTop = function() {
|
||||||
position = 0;
|
position = 0;
|
||||||
}, this.fa = function(fR, fS) {
|
}, this.fa = function(fR, fS) {
|
||||||
|
@ -3391,8 +3398,8 @@ function bj() {
|
||||||
a19 = !1;
|
a19 = !1;
|
||||||
var a1X = a1Y(fS);
|
var a1X = a1Y(fS);
|
||||||
var isEmptySpace = false;
|
var isEmptySpace = false;
|
||||||
return ak.uK() && -1 !== a17 && (a17 = -1, a1F(), b7.d9 = !0), b7.dg - a18 < 350 && a1B === a1X && -1 !== (a1X = (a1X = zY(-1, a1X, a0q)) !== a0q && rT(fR, fS) ? a1X : -1) && (fR = (leaderboardFilter.enabled ? jR[leaderboardFilter
|
return ak.uK() && -1 !== a17 && (a17 = -1, a1F(), b7.d9 = !0), b7.dg - a18 < 350 && a1B === a1X && -1 !== (a1X = (a1X = zY(-1, a1X, a0q)) !== a0q && rT(fR, fS) ? a1X : -1) && (fR = (leaderboardFilter.enabled ? (updateFilteredLb(), jR[
|
||||||
.filteredLeaderboard[a1X + position] ?? (isEmptySpace = true, a0l[b.ed])] : jR[a1X + position]), a1X === a0q - 1 && (leaderboardFilter.enabled ? this.playerPos : a0l[b.ed]) >=
|
leaderboardFilter.filteredLeaderboard[a1X + position] ?? (isEmptySpace = true, a0l[b.ed])]) : jR[a1X + position]), a1X === a0q - 1 && (leaderboardFilter.enabled ? this.playerPos : a0l[b.ed]) >=
|
||||||
position + a0q - 1 && (fR = b.ed), !isEmptySpace && b.hX && donationsTracker.displayHistory(fR, a8.xb, b.iy), 0 !== a8.hA[fR] && !isEmptySpace) && g.kI(fR, 800, !1, 0), !0
|
position + a0q - 1 && (fR = b.ed), !isEmptySpace && b.hX && donationsTracker.displayHistory(fR, a8.xb, b.iy), 0 !== a8.hA[fR] && !isEmptySpace) && g.kI(fR, 800, !1, 0), !0
|
||||||
}, this.ti = function(fR, fS, deltaY) {
|
}, this.ti = function(fR, fS, deltaY) {
|
||||||
var a1Z;
|
var a1Z;
|
||||||
|
@ -5522,11 +5529,11 @@ function cL() {
|
||||||
|
|
||||||
function bz() {
|
function bz() {
|
||||||
this.xb = new Array(b.em), this.jx = new Array(b.em), this.hB = new Uint8Array(b.em), this.hA = new Uint8Array(b.em), this.i5 = new Uint16Array(b.em), this.i8 = new Uint16Array(b.em), this.i4 = new Uint16Array(b.em), this.i7 = new Uint16Array(b
|
this.xb = new Array(b.em), this.jx = new Array(b.em), this.hB = new Uint8Array(b.em), this.hA = new Uint8Array(b.em), this.i5 = new Uint16Array(b.em), this.i8 = new Uint16Array(b.em), this.i4 = new Uint16Array(b.em), this.i7 = new Uint16Array(b
|
||||||
.em), this.f8 = new Uint32Array(b.em), this.qS = new Uint32Array(b.em), this.ee = new Uint32Array(b.em), donationsTracker.reset(), leaderboardFilter.reset(), this.ej = null, this.f0 = null, this.f1 = null, this.f4 = null, this.mr =
|
.em), this.f8 = new Uint32Array(b.em), this.qS = new Uint32Array(b.em), this.ee = new Uint32Array(b.em), this.ej = null, this.f0 = null, this.f1 = null, this.f4 = null, this.mr = new Uint16Array(b.em), this.hU = new Uint16Array(b.em),
|
||||||
new Uint16Array(b.em), this.hU = new Uint16Array(b.em), this.hV = new Uint16Array(b.em), this.sW = new Uint16Array(b.em), this.aA0 = new Uint8Array(b.em), this.cy = function(qv) {
|
this.hV = new Uint16Array(b.em), this.sW = new Uint16Array(b.em), this.aA0 = new Uint8Array(b.em), this.cy = function(qv) {
|
||||||
for (let eM = qv.length - 1; 0 <= eM; eM--) this.jx[eM] = this.xb[eM] = qv[eM].name, this.hB[eM] = qv[eM].a5k;
|
for (let eM = qv.length - 1; 0 <= eM; eM--) this.jx[eM] = this.xb[eM] = qv[eM].name, this.hB[eM] = qv[eM].a5k;
|
||||||
this.hA.fill(0), this.i5.fill(0), this.i8.fill(0), this.i4.fill(0), this.i7.fill(0), this.f8.fill(0), this.qS.fill(0), this.ee.fill(0), this.ej = new Array(b.em), this.f0 = new Array(b.em), this.f1 = new Array(b.em), this.f4 = new Array(b
|
this.hA.fill(0), this.i5.fill(0), this.i8.fill(0), this.i4.fill(0), this.i7.fill(0), this.f8.fill(0), this.qS.fill(0), this.ee.fill(0), donationsTracker.reset(), leaderboardFilter.reset(), this.ej = new Array(b.em), this.f0 = new Array(b
|
||||||
.em), this.mr.fill(0), this.hU.fill(0), this.hV.fill(0), this.sW.fill(0), this.aA0.fill(0)
|
.em), this.f1 = new Array(b.em), this.f4 = new Array(b.em), this.mr.fill(0), this.hU.fill(0), this.hV.fill(0), this.sW.fill(0), this.aA0.fill(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?1717241042535">
|
<link rel="stylesheet" href="main.css?1717435018305">
|
||||||
<!-- Game CSS -->
|
<!-- Game CSS -->
|
||||||
<style>
|
<style>
|
||||||
html,
|
html,
|
||||||
|
@ -122,8 +122,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?1717241042535"></script>
|
<script src="variables.js?1717435018305"></script>
|
||||||
<script src="fx_core.js?1717241042535"></script>
|
<script src="fx_core.js?1717435018305"></script>
|
||||||
<script src="game.js?1717241042535"></script>
|
<script src="game.js?1717435018305"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue