Update v0.6.3.3; Fixes to the win counter

Fixed the win counter not counting wins correctly,
disabled win tracking for singleplayer games,
added a clarification in the settings menu about which wins are actually tracked (only solo multiplayer wins),
and fixed the win counter text in the main menu becoming black when the emoji or color picker were opened.
archived
peshomir 2024-04-11 12:19:26 +03:00
parent a32302be5f
commit ce2e2468fd
2 changed files with 15 additions and 7 deletions

View File

@ -137,8 +137,10 @@ replaceRawCode(`ar.oa(4,1,new s8(" "+Translations.txt[84],gameVersion+"<br
`$1 if (${dictionary.playerId} === $2) wins_counter++, window.localStorage.setItem("fx_winCount", wins_counter); ` +
`$3, $4, $5, "Your Current Win Count is Now " + wins_counter, $8, $<end>`);*/
replaceRawCode(`=function(rC){n.hQ(rC,2),vm(0,h2<100?aV.s9(4,[jm[rC]]):aV.s9(12,[jm[rC]]),3,rC,aZ.gG,aZ.ka,-1,!0),`,
`=function(rC){ if (${dictionary.playerId} === $2) wins_counter++, window.localStorage.setItem("fx_winCount", wins_counter),
vm(0,"Your Current Win Count is Now " + wins_counter,3,rC,aZ.gG,aZ.ka,-1,!0);
`=function(rC){
if (${dictionary.playerId} === rC && !${dictionary.gIsSingleplayer})
wins_counter++, window.localStorage.setItem("fx_winCount", wins_counter),
vm(0,"Your Win Count is now " + wins_counter,3,rC,aZ.gG,aZ.ka,-1,!0);
n.hQ(rC,2),vm(0,h2<100?aV.s9(4,[jm[rC]]):aV.s9(12,[jm[rC]]),3,rC,aZ.gG,aZ.ka,-1,!0),`);
@ -161,7 +163,11 @@ replaceRawCode(`,fy=aV.nU[80],fontSize=.65*height,canvas.font=aY.g0.g1(1,fontSiz
canvas.imageSmoothingEnabled = true,
canvas.drawImage(settingsGearIcon, x - width / 2, y, height, height),
canvas.imageSmoothingEnabled = false,
(settings.displayWinCounter && ( canvas.font = aY.g0.g1(1, Math.floor(height * 0.4)), canvas.fillText("Win count: " + wins_counter, Math.floor(x + width / 2), Math.floor((y + height / 2) * 2)) ) ),
(settings.displayWinCounter && (
canvas.font = aY.g0.g1(1, Math.floor(height * 0.4)),
canvas.fillStyle = "#ffffff",
canvas.fillText("Win count: " + wins_counter, Math.floor(x + width / 2), Math.floor((y + height / 2) * 2))
)),
canvas.font=aY.g0.g1(1,fontSize),canvas.fillStyle="rgba("+gR+","+tD+","+hj+",0.6)",canvas.fillRect(x,y,width,height),`);
// handle settings button click

View File

@ -1,5 +1,5 @@
const fx_version = '0.6.3.2'; // FX Client Version
const fx_update = 'Apr 3'; // FX Client Last Updated
const fx_version = '0.6.3.3'; // FX Client Version
const fx_update = 'Apr 11'; // FX Client Last Updated
if (localStorage.getItem("fx_winCount") == undefined || localStorage.getItem("fx_winCount") == null) {
var wins_counter = 0;
@ -119,8 +119,10 @@ var settingsManager = new (function() {
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: "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." },
{ for: "displayWinCounter", type: "checkbox", label: "Display win counter",
note: "The win counter tracks multiplayer solo wins (not in team games)" },
{ 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." },
//{ 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" },