Compare commits
	
		
			No commits in common. "14c13ce1caaa56053f5e52b143807e631d1fa811" and "7c0f0e0a2c16d1544ad5c19b87332521ea310ecf" have entirely different histories. 
		
	
	
		
			14c13ce1ca
			...
			7c0f0e0a2c
		
	
		
	
								
									
									
										
											5
										
									
									build.js
									
									
									
									
								
								
							
							
										
											5
										
									
									build.js
									
									
									
									
								| 
						 | 
					@ -79,13 +79,12 @@ const generateRegularExpression = (/** @type {string} */ code, /** @type {boolea
 | 
				
			||||||
	/,this\.(?<gIsTeamGame>\w+)=this\.\w+<7\|\|9===this\.\w+,/g,
 | 
						/,this\.(?<gIsTeamGame>\w+)=this\.\w+<7\|\|9===this\.\w+,/g,
 | 
				
			||||||
	/=function\((\w+),(\w+),\w+\){\1===(?<game>\w+)\.(?<playerId>\w+)\?\w+\(175,\w+\.\w+\(18,\[(?<playerData>\w+)\.(?<playerNames>\w+)\[\2\]\]\),1001,\2,\w+\(/g,
 | 
						/=function\((\w+),(\w+),\w+\){\1===(?<game>\w+)\.(?<playerId>\w+)\?\w+\(175,\w+\.\w+\(18,\[(?<playerData>\w+)\.(?<playerNames>\w+)\[\2\]\]\),1001,\2,\w+\(/g,
 | 
				
			||||||
	/\w+\.\w+\((\w+)\)\?\w+\.\w+\(\1\)\?(\w+)=(\w+\.\w+)\(13,\[\2\]\):\(\w+=\w+\.\w+\(\1\),\2=\3\(14,\[\w+\.\w+\.\w+\((?<playerData>\w+)\.(?<rawPlayerNames>\w+)\[(\w+)\],\w+\.\w+\.\w+\(0,10\),150\),(\w+\.\w+\.\w+\()\4\.(?<playerBalances>\w+)\[\6\]\),\7\4\.(?<playerTerritories>\w+)\[\6\]\),\2\]\),\w+=!0\):\2=/g,
 | 
						/\w+\.\w+\((\w+)\)\?\w+\.\w+\(\1\)\?(\w+)=(\w+\.\w+)\(13,\[\2\]\):\(\w+=\w+\.\w+\(\1\),\2=\3\(14,\[\w+\.\w+\.\w+\((?<playerData>\w+)\.(?<rawPlayerNames>\w+)\[(\w+)\],\w+\.\w+\.\w+\(0,10\),150\),(\w+\.\w+\.\w+\()\4\.(?<playerBalances>\w+)\[\6\]\),\7\4\.(?<playerTerritories>\w+)\[\6\]\),\2\]\),\w+=!0\):\2=/g,
 | 
				
			||||||
 | 
						/,this\.(?<gLobbyMaxJoin>\w+)=this\.(?<gMaxPlayers>\w+),this\.(?<gIsSingleplayer>\w+)&&\(this\.\1=\w+\.\w+\(\)\),this\.\w+=this\.\1-this\.\w+,this\.\w+=0,/g,
 | 
				
			||||||
	/function \w+\(\)\{if\(2===(?<game>\w+)\.(?<gameState>\w+)\)return 1;\w+\.\w+\(\),\1\.\2=2,\1\.\w+=\1.\w+\}/g,
 | 
						/function \w+\(\)\{if\(2===(?<game>\w+)\.(?<gameState>\w+)\)return 1;\w+\.\w+\(\),\1\.\2=2,\1\.\w+=\1.\w+\}/g,
 | 
				
			||||||
	/(function \w+\((\w+),(?<fontSize>\w+),(?<x>\w+),(?<y>\w+),(?<canvas>\w+)\){)(\6\.fillText\((?<playerData>\w+)\.(?<playerNames>\w+)\[\2\],\4,\5\)),(\2<(?<game>\w+)\.(?<gHumans>\w+)&&2!==\8\.(?<playerStates>\w+)\[[^}]+)}/g,
 | 
						/(function \w+\((\w+),(?<fontSize>\w+),(?<x>\w+),(?<y>\w+),(?<canvas>\w+)\){)(\6\.fillText\((?<playerData>\w+)\.(?<playerNames>\w+)\[\2\],\4,\5\)),(\2<(?<game>\w+)\.(?<gHumans>\w+)&&2!==\8\.(?<playerStates>\w+)\[[^}]+)}/g
 | 
				
			||||||
	/\w+\.font=(?<fontGeneratorFunction>\w+\.\w+\.\w+)\(1,\.39\*this\.\w+\),/g
 | 
					 | 
				
			||||||
].forEach(matchDictionaryExpression);
 | 
					].forEach(matchDictionaryExpression);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const rawCodeSegments = [
 | 
					const rawCodeSegments = [
 | 
				
			||||||
	",this.@gIsSingleplayer?this.@gLobbyMaxJoin=@SingleplayerMenu.@getSingleplayerPlayerCount():this.gLobbyMaxJoin=this.@gMaxPlayers,this.@gBots=this.gLobbyMaxJoin-this.@gHumans,this.sg=0,",
 | 
					 | 
				
			||||||
	"[0]=@Translations.@txt[70],@strs[1]=@game.@gIsSingleplayer?@Translations.txt[71]:@Translations.txt[72],",
 | 
						"[0]=@Translations.@txt[70],@strs[1]=@game.@gIsSingleplayer?@Translations.txt[71]:@Translations.txt[72],",
 | 
				
			||||||
	"?(this.gB=Math.floor(.0536*aK.fw),g5=aK.g5-4*@uiSizes.@gap-this.gB):",
 | 
						"?(this.gB=Math.floor(.0536*aK.fw),g5=aK.g5-4*@uiSizes.@gap-this.gB):",
 | 
				
			||||||
	`for(a0L=new Array(@game.@gMaxPlayers),a0A.font=a07,@i=game.gMaxPlayers-1;0<=i;i--)a0L[i]=i+1+".",@playerData.@playerNames[i]=aY.qW.tm(playerData.@rawPlayerNames[i],a07,a0W),a0K[i]=Math.floor(a0A.measureText(playerData.playerNames[i]).width);`,
 | 
						`for(a0L=new Array(@game.@gMaxPlayers),a0A.font=a07,@i=game.gMaxPlayers-1;0<=i;i--)a0L[i]=i+1+".",@playerData.@playerNames[i]=aY.qW.tm(playerData.@rawPlayerNames[i],a07,a0W),a0K[i]=Math.floor(a0A.measureText(playerData.playerNames[i]).width);`,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
								
									
									
										
											31
										
									
									patches.js
									
									
									
									
								
								
							
							
										
											31
										
									
									patches.js
									
									
									
									
								| 
						 | 
					@ -44,28 +44,7 @@ export default ({ replace, replaceOne, replaceRawCode, dictionary, matchOne, mat
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    { // Add settings button and win count
 | 
					    { // Add settings button and win count
 | 
				
			||||||
        // add settings button
 | 
					        // render gear icon and win count
 | 
				
			||||||
        replaceRawCode(`,new nQ("⚙️<br>Menu",function(){aD6(3)},aa.ks)]`,
 | 
					 | 
				
			||||||
            `,new nQ("⚙️<br>Menu",function(){aD6(3)},aa.ks),
 | 
					 | 
				
			||||||
            new nQ("FX Client settings", function() { WindowManager.openWindow("settings"); }, "rgba(0, 0, 20, 0.5")]`)
 | 
					 | 
				
			||||||
        // set settings button position
 | 
					 | 
				
			||||||
        replaceRawCode(`aZ.g5.vO(aD3[3].button,x+a0S+gap,a3X+h+gap,a0S,h);`,
 | 
					 | 
				
			||||||
            `aZ.g5.vO(aD3[3].button,x+a0S+gap,a3X+h+gap,a0S,h); aZ.g5.vO(aD3[4].button, x, a3X + h * 2 + gap * 2, a0S * 2 + gap, h / 3);`);
 | 
					 | 
				
			||||||
        // render win count
 | 
					 | 
				
			||||||
        replaceRawCode(`if(y.a4l(),r.gI(),m.gI(),aw.gI(),ay.gI(),a0.g8()){ctx.imageSmoothingEnabled=!1;var iQ=a0.a4o("territorial.io"),kL=aD4.gA/iQ.width;`,
 | 
					 | 
				
			||||||
            `if(y.a4l(),r.gI(),m.gI(),aw.gI(),ay.gI(),a0.g8()){
 | 
					 | 
				
			||||||
            if (settings.displayWinCounter) {
 | 
					 | 
				
			||||||
                const size = Math.floor(aD4.gA * 0.03);
 | 
					 | 
				
			||||||
                ctx.font = ${dict.fontGeneratorFunction}(1, size);
 | 
					 | 
				
			||||||
                ctx.fillStyle = "#ffffff";
 | 
					 | 
				
			||||||
                const text = "Win count: " + wins_counter;
 | 
					 | 
				
			||||||
                const textLength = ctx.measureText(text).width;
 | 
					 | 
				
			||||||
                ctx.textAlign = "left";
 | 
					 | 
				
			||||||
                ctx.textBaseline = "middle";
 | 
					 | 
				
			||||||
                ctx.fillText(text, ctx.canvas.width - textLength - size / 2, size);
 | 
					 | 
				
			||||||
            };
 | 
					 | 
				
			||||||
            ctx.imageSmoothingEnabled=!1;var iQ=a0.a4o("territorial.io"),kL=aD4.gA/iQ.width;`)
 | 
					 | 
				
			||||||
        /*// render gear icon and win count
 | 
					 | 
				
			||||||
        replaceRawCode(`,fy=aV.nU[80],fontSize=.65*height,canvas.font=aY.g0.g1(1,fontSize),canvas.fillStyle="rgba("+gR+","+tD+","+hj+",0.6)",canvas.fillRect(x,y,width,height),`,
 | 
					        replaceRawCode(`,fy=aV.nU[80],fontSize=.65*height,canvas.font=aY.g0.g1(1,fontSize),canvas.fillStyle="rgba("+gR+","+tD+","+hj+",0.6)",canvas.fillRect(x,y,width,height),`,
 | 
				
			||||||
            `,fy=aV.nU[80],fontSize=.65*height,
 | 
					            `,fy=aV.nU[80],fontSize=.65*height,
 | 
				
			||||||
canvas.imageSmoothingEnabled = true,
 | 
					canvas.imageSmoothingEnabled = true,
 | 
				
			||||||
| 
						 | 
					@ -82,7 +61,7 @@ canvas.font=aY.g0.g1(1,fontSize),canvas.fillStyle="rgba("+gR+","+tD+","+hj+",0.6
 | 
				
			||||||
        replaceRawCode(`(q6=Math.floor((b7.cv.fv()?.145:.09)*aK.fw),gap=Math.floor(.065*(b7.cv.fv()?.53:.36)*aK.fw),gap=aK.g5-q6-gap,jd=b0.gap,q6=Math.floor(.35*q6),gap<=mouseX&&mouseY<jd+q6&&ar.v2(1))`,
 | 
					        replaceRawCode(`(q6=Math.floor((b7.cv.fv()?.145:.09)*aK.fw),gap=Math.floor(.065*(b7.cv.fv()?.53:.36)*aK.fw),gap=aK.g5-q6-gap,jd=b0.gap,q6=Math.floor(.35*q6),gap<=mouseX&&mouseY<jd+q6&&ar.v2(1))`,
 | 
				
			||||||
            `(q6=Math.floor((b7.cv.fv()?.145:.09)*aK.fw),gap=Math.floor(.065*(b7.cv.fv()?.53:.36)*aK.fw),gap=aK.g5-q6-gap,jd=b0.gap,q6=Math.floor(.35*q6),
 | 
					            `(q6=Math.floor((b7.cv.fv()?.145:.09)*aK.fw),gap=Math.floor(.065*(b7.cv.fv()?.53:.36)*aK.fw),gap=aK.g5-q6-gap,jd=b0.gap,q6=Math.floor(.35*q6),
 | 
				
			||||||
(gap <= mouseX && mouseY < jd + q6 && (ar.v2(1), true)) || (mouseX >= gap - q6 / 0.7 && mouseY < jd + q6 && WindowManager.openWindow("settings"))
 | 
					(gap <= mouseX && mouseY < jd + q6 && (ar.v2(1), true)) || (mouseX >= gap - q6 / 0.7 && mouseY < jd + q6 && WindowManager.openWindow("settings"))
 | 
				
			||||||
)`);*/
 | 
					)`);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    { // Keybinds
 | 
					    { // Keybinds
 | 
				
			||||||
| 
						 | 
					@ -113,10 +92,8 @@ canvas.font=aY.g0.g1(1,fontSize),canvas.fillStyle="rgba("+gR+","+tD+","+hj+",0.6
 | 
				
			||||||
    // Make the main canvas context have an alpha channel if a custom background is being used
 | 
					    // Make the main canvas context have an alpha channel if a custom background is being used
 | 
				
			||||||
    replaceOne(/(document\.getElementById\("canvasA"\),\(\w+=\w+\.getContext\("2d",){alpha:!1}/g, "$1 {alpha: makeMainMenuTransparent}")
 | 
					    replaceOne(/(document\.getElementById\("canvasA"\),\(\w+=\w+\.getContext\("2d",){alpha:!1}/g, "$1 {alpha: makeMainMenuTransparent}")
 | 
				
			||||||
    // Clear canvas background if a custom background is being used
 | 
					    // Clear canvas background if a custom background is being used
 | 
				
			||||||
    replaceRawCode(`,this.qk=function(){var a4n,a4m;aq.pd?(a4m=aL.gA/aq.eE,a4n=aL.gF/aq.eF,canvas.setTransform(a4m=a4n<a4m?a4m:a4n,0,0,a4m,`,
 | 
					    replaceOne(/(this\.\w+=function\(\){var (\w+),(\w+);)(\w+\.\w+\?\([^()]+setTransform\(\3=\2<\3\?\3:\2,0,0,\3,(?:Math\.floor\(\([^)]+\)\/2\)[,)]){2},(?:[^)]+\),){2}[^)]+\):(?<canvas>\w+)\.fillStyle=\w+\.\w+,\5\.fillRect\((?<wholeCanvas>0,0,\w+\.\w+,\w+\.\w+)\)}})/g,
 | 
				
			||||||
        `,this.qk=function(){var a4n,a4m;
 | 
					        '$1 if (makeMainMenuTransparent) $<canvas>.clearRect($<wholeCanvas>); else $4')
 | 
				
			||||||
        if (makeMainMenuTransparent) canvas.clearRect(0,0,aL.gA,aL.gF);
 | 
					 | 
				
			||||||
        else aq.pd?(a4m=aL.gA/aq.eE,a4n=aL.gF/aq.eF,canvas.setTransform(a4m=a4n<a4m?a4m:a4n,0,0,a4m,`);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Track donations
 | 
					    // Track donations
 | 
				
			||||||
    replaceOne(/(this\.\w+=function\((\w+),(\w+)\)\{)(\2===\w+\.\w+&&\(\w+\.\w+\((\w+\.\w+)\[0\],\5\[1\],\3\),this\.(\w+)\[12\]\+=\5\[1\],this\.\6\[16\]\+=\5\[0\]\),\3===\w+\.\w+&&\()/g,
 | 
					    replaceOne(/(this\.\w+=function\((\w+),(\w+)\)\{)(\2===\w+\.\w+&&\(\w+\.\w+\((\w+\.\w+)\[0\],\5\[1\],\3\),this\.(\w+)\[12\]\+=\5\[1\],this\.\6\[16\]\+=\5\[0\]\),\3===\w+\.\w+&&\()/g,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
const fx_version = '0.6.4.7'; // FX Client Version
 | 
					const fx_version = '0.6.4.6'; // FX Client Version
 | 
				
			||||||
const fx_update = 'Jun 20'; // FX Client Last Updated
 | 
					const fx_update = 'Jun 5'; // 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;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -78,7 +78,7 @@ textarea {
 | 
				
			||||||
	transition: 0.2s;
 | 
						transition: 0.2s;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.window button:hover {
 | 
					button:hover {
 | 
				
			||||||
	background-color: rgba(222, 222, 222, 0.52);
 | 
						background-color: rgba(222, 222, 222, 0.52);
 | 
				
			||||||
	border-radius   : 8px;
 | 
						border-radius   : 8px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue