Compare commits
No commits in common. "e6fd193beeed78d61e1c68b7a59e6c0203b210f9" and "261d33c1d2f66493a63cc943c85bc7db33469daa" have entirely different histories.
e6fd193bee
...
261d33c1d2
|
@ -16,8 +16,9 @@ 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 aRc;if(l.dk){aRc="ws://localhost:"+(7130+a09)+"/";}else{aRc=aRX[0]+az.y.aQ9[a09]+aRX[1+l.dl];}aRW=new WebSocket(aRc)`,
|
||||
`var aRc;if(l.dk){aRc="ws://localhost:"+(7130+a09)+"/";}else{aRc=aRX[0]+az.y.aQ9[a09]+aRX[1+l.dl];}aRW=new WebSocket(__fx.customLobby.isActive() && a09 === 1 ? __fx.customLobby.getSocketURL() : aRc)`)
|
||||
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 */`,
|
||||
`if (socketId === 1 && __fx.customLobby.isActive()) {
|
||||
|
@ -37,8 +38,6 @@ export default (/** @type {ModUtils} */ { insertCode, replaceCode, replaceRawCod
|
|||
`(__fx.customLobby.setLeaveFunction(() => {n.r(),bl.zf(),Sockets.s.ze(3240),__fx.customLobby.setActive(false),n.o(5,5)}),
|
||||
function(){n.r(),bl.zf(),Sockets.s.ze(3240),__fx.customLobby.setActive(false),n.o(5,5)})`)
|
||||
// when a socket error occurs on the custom lobby socket
|
||||
// TODO: Fix these after main WebSocket fix is confirmed working
|
||||
/*
|
||||
replaceRawCode("this.wQ=function(wR,d){if(8===i.pz&&0===wR)if(4211===d)wS(d);",
|
||||
`this.wQ=function(wR,d){
|
||||
wR===1 && __fx.customLobby.isActive() && ${dict.MenuManager}.${dict.getState}() !== 6 && __fx.customLobby.setActive(false);
|
||||
|
@ -77,6 +76,5 @@ export default (/** @type {ModUtils} */ { insertCode, replaceCode, replaceRawCod
|
|||
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,`)
|
||||
*/
|
||||
});
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
import WindowManager from "./windowManager.js";
|
||||
|
||||
const customLobbiesUnavailable = true;
|
||||
//const socketURL = "ws://localhost:8080/";
|
||||
const socketURL = "wss://fx.peshomir.workers.dev/";
|
||||
const customMessageMarker = 120;
|
||||
|
@ -16,15 +15,6 @@ WindowManager.add({
|
|||
name: "lobbyJoinMenu",
|
||||
element: document.getElementById("customLobbyJoinMenu")
|
||||
})
|
||||
|
||||
if (customLobbiesUnavailable) {
|
||||
const window = WindowManager.create({
|
||||
name: "customLobbiesUnavailable",
|
||||
closeWithButton: true
|
||||
});
|
||||
window.innerHTML = `<p>The latest version of FX Client doesn't support custom lobbies yet. Use the stable version at <a href="https://fxclient.github.io/custom-lobbies/">https://fxclient.github.io/custom-lobbies</a></p>`;
|
||||
}
|
||||
|
||||
const windowElement = WindowManager.create({
|
||||
name: "customLobby",
|
||||
classes: "scrollable selectable flex-column text-align-center",
|
||||
|
@ -165,8 +155,6 @@ function setSelectMenuOptions(options, element) {
|
|||
}
|
||||
|
||||
function showJoinPrompt() {
|
||||
if (customLobbiesUnavailable)
|
||||
return WindowManager.openWindow("customLobbiesUnavailable");
|
||||
WindowManager.openWindow("lobbyJoinMenu");
|
||||
}
|
||||
document.getElementById("lobbyCode").addEventListener("input", ({ target: input }) => {
|
||||
|
@ -313,7 +301,6 @@ function rejoinLobby() {
|
|||
function checkForLobbyLink(isHashChangeEvent) {
|
||||
const hash = window.location.hash;
|
||||
if (hash.startsWith("#lobby=")) {
|
||||
if (customLobbiesUnavailable) return WindowManager.openWindow("customLobbiesUnavailable");
|
||||
// in case the player is already in a lobby
|
||||
if (isHashChangeEvent) leaveLobby();
|
||||
currentCode = hash.slice(7);
|
||||
|
|
12
version.json
12
version.json
|
@ -1,8 +1,12 @@
|
|||
{
|
||||
"version": "0.6.9",
|
||||
"lastUpdated": "Jun 28",
|
||||
"version": "0.6.8",
|
||||
"lastUpdated": "Mar 22",
|
||||
"changes": [
|
||||
"Updated FX Client to the latest game version",
|
||||
"The custom lobbies haven't been updated to work in this version, but are still available in the new stable custom lobby version. A link to it is available in the alert which opens when clicking the custom lobby button in the main menu."
|
||||
"Added a \"What's new\" screen (the one you're looking at right now!) which displays a changelog of the latest version",
|
||||
"Added custom lobby join links - to get one, click on the new \"Copy link\" button while in a lobby.",
|
||||
"Added version information at the bottom of the setting page along with a link to the FX Client Discord server and GitHub repository. Previously this was shown only in the vanilla version menu.",
|
||||
"Added a settings option to toggle displaying a player's donation history when clicking on their name in the leaderboard (applies to team games only)",
|
||||
"Changed the font for the FX Client UI elements",
|
||||
"The custom lobby server no longer tries to verify the compatibility of the client's protocol version. This will make custom lobbies usable immediately after an update, provided that the communication protocol has not changed significantly."
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue