Fix for update v2.05.0
							parent
							
								
									8279e6260a
								
							
						
					
					
						commit
						da3c5b0e15
					
				
								
									
									
										
											2
										
									
									build.js
									
									
									
									
								
								
							
							
										
											2
										
									
									build.js
									
									
									
									
								|  | @ -87,7 +87,7 @@ const dictionary = modUtils.dictionary; | |||
| 
 | ||||
| const rawCodeSegments = [ | ||||
| 	`aQ.eI(e0)?aQ.eE(e0)?a38=__L([a38]):(player=aQ.eF(e0),oq=__L([b0.uS.zG(@playerData.@rawPlayerNames[player],b0.p9.qQ(0,10),150)])+"   ",oq=(oq+=__L([b0.wx.a07(playerData.@playerBalances[player])])+"   ")+__L([b0.wx.a07(playerData.@playerTerritories[player])])+"   ",`, | ||||
| 	"this.@gLobbyMaxJoin=1===dg?this.@gHumans:this.@data.@playerCount,this.tZ=this.gLobbyMaxJoin,this.@gBots=this.gLobbyMaxJoin-this.gHumans,this.sg=0,", | ||||
| 	"1===a.b?this.@gLobbyMaxJoin=this.@gHumans:this.gLobbyMaxJoin=this.@data.@playerCount,this.tZ=this.gLobbyMaxJoin,this.@gBots=this.gLobbyMaxJoin-this.gHumans,this.sg=0,", | ||||
| 	"[0]=__L(),@strs[1]=@game.@gIsSingleplayer?__L():__L(),", | ||||
| 	"?(this.gB=Math.floor(.066*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);`, | ||||
|  |  | |||
|  | @ -16,8 +16,8 @@ export default (/** @type {ModUtils} */ { insertCode, replaceCode, replaceRawCod | |||
|     insertCode(`this.y___ = function() { s___.t(5, 5); };
 | ||||
| 	    this.a3a = function() { s___.w___(); aY.init(); }; /* here */`,
 | ||||
|         `__fx.customLobby.setJoinFunction(() => { s___.w___(); aY.init(); });`) | ||||
|     replaceCode(`var url = aQt[0] + Sockets.a.b[socketId] + aQt[1 + dg]; socket = new WebSocket(url);`, | ||||
|         `var url = aQt[0] + Sockets.a.b[socketId] + aQt[1 + dg];
 | ||||
|     replaceCode(`var url = aQt[0] + Sockets.a.b[socketId] + aQt[1 + l.dg]; socket = new WebSocket(url);`, | ||||
|         `var url = aQt[0] + Sockets.a.b[socketId] + aQt[1 + l.dg];
 | ||||
|         socket = new WebSocket(__fx.customLobby.isActive() && socketId === 1 ? __fx.customLobby.getSocketURL() : url);`)
 | ||||
|     // if the server is unreachable
 | ||||
|     insertCode(`if (socketId === 0) { q.a08(3249); return; } /* here */`, | ||||
|  | @ -73,8 +73,8 @@ export default (/** @type {ModUtils} */ { insertCode, replaceCode, replaceRawCod | |||
|         replaceRawCode(":50,this.a=this.b=this.data.c,this.d=this.b?new e:null,", | ||||
|             ":50,this.a=this.b=__fx.customLobby.isActive() ? __fx.customLobby.gameInfo.spawnSelection : this.data.c,this.d=this.b?new e:null,") | ||||
|         // bot count
 | ||||
|         replaceRawCode(",this.gLobbyMaxJoin=1===dg?this.gHumans:this.data.playerCount,this.maxPlayers=this.gLobbyMaxJoin,this.gBots=this.gLobbyMaxJoin-this.gHumans,this.sg=0,", | ||||
|             `,this.gLobbyMaxJoin = __fx.customLobby.isActive() ? Math.max(Math.min(__fx.customLobby.gameInfo.botCount, this.data.playerCount), this.gHumans) : 1===dg?this.gHumans:this.data.playerCount,
 | ||||
|         replaceRawCode("1===a.b?this.gLobbyMaxJoin=this.gHumans:this.gLobbyMaxJoin=this.data.playerCount,this.maxPlayers=this.gLobbyMaxJoin,this.gBots=this.gLobbyMaxJoin-this.gHumans,this.sg=0,", | ||||
|             `this.gLobbyMaxJoin = __fx.customLobby.isActive() ? Math.max(Math.min(__fx.customLobby.gameInfo.botCount, this.data.playerCount), this.gHumans) : 1===a.b?this.gLobbyMaxJoin=this.gHumans:this.gLobbyMaxJoin=this.data.playerCount,
 | ||||
|             this.maxPlayers=this.gLobbyMaxJoin,this.gBots=this.gLobbyMaxJoin-this.gHumans,this.sg=0,`)
 | ||||
|     }); | ||||
| } | ||||
|  | @ -20,8 +20,8 @@ function applyPatches(/** @type {ModUtils} */ { replace, replaceOne, replaceRawC | |||
|     replaceOne(/(\(22,"logo",8,")[^"]+"\)/g, "$1" + assets.smallLogo + "\")"); | ||||
| 
 | ||||
|     // Add FX Client version info to the game version window
 | ||||
|     replaceRawCode(`ar.oa(4,1,new s8(__L(),gameVersion+"<br><a href='"+ah.aC5+"' target='_blank'>"+ah.aC5+"</a>",`, | ||||
|         `ar.oa(4,1,new s8(__L(),gameVersion+"<br><a href='"+ah.aC5+"' target='_blank'>"+ah.aC5+"</a>"
 | ||||
|     replaceRawCode(`ar.oa(4,1,new s8(__L(),c.gameVersion+"<br><a href='"+ah.aC5+"' target='_blank'>"+ah.aC5+"</a>",`, | ||||
|         `ar.oa(4,1,new s8(__L(),c.gameVersion+"<br><a href='"+ah.aC5+"' target='_blank'>"+ah.aC5+"</a>"
 | ||||
| + "<br><br><b>" + "FX Client v" + __fx.version + "<br><a href='https://discord.gg/dyxcwdNKwK' target='_blank'>FX Client Discord server</a>" | ||||
| + "<br><a href='https://github.com/fxclient/FXclient' target='_blank'>Github repository</a></b>",`);
 | ||||
| 
 | ||||
|  | @ -298,8 +298,8 @@ canvas.font=aY.g0.g1(1,fontSize),canvas.fillStyle="rgba("+gR+","+tD+","+hj+",0.6 | |||
|     replaceRawCode(",fontSize=+dz*Math.min(f0,.37);", ",fontSize=(__fx.settings.detailedTeamPercentage ? 0.75 : 1)*dz*Math.min(f0,.37);") | ||||
| 
 | ||||
|     // Invalid hostname detection avoidance
 | ||||
|     replaceRawCode(`,hostnameIsValid=0<=window.location.hostname.toLowerCase().indexOf("territorial.io"),`, | ||||
|         `,hostnameIsValid=true,`) | ||||
|     replaceRawCode(`,this.hostnameIsValid=0<=window.location.hostname.toLowerCase().indexOf("territorial.io"),`, | ||||
|         `,this.hostnameIsValid=true,`) | ||||
| 
 | ||||
|     // Disable built-in Territorial.io error reporting
 | ||||
|     replaceOne(/window\.addEventListener\("error",function (\w+)\((\w+)\){/g, | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| const fx_version = '0.6.7.3'; // FX Client Version
 | ||||
| const fx_version = '0.6.7.4'; // FX Client Version
 | ||||
| const fx_update = 'Mar 8'; // FX Client Last Updated
 | ||||
| 
 | ||||
| if ("serviceWorker" in navigator) { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue