Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions patches/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ export default definePatch(({ insertCode, modifyCode, replaceCode }) => {
return;
} ${insert(`if (!__fx.settings.hidePropagandaPopup && !__fx.customLobby.isActive())`)} a.g.h(5);`)

// Don't reload FX users to main terri page.
replaceCode(
`var url = new URL("https://territorial.io/");
url.searchParams.set("v", "" + Math.floor(Math.random() * 1000));
window.location.href = url.toString();`,

`var url = new URL(window.location);
url.searchParams.set("v", "" + Math.floor(Math.random() * 1000));
window.location.href = url.toString();`
)

// Disable built-in Territorial.io error reporting
insertCode(
`window.removeEventListener("error", err);
Expand Down
4 changes: 2 additions & 2 deletions patches/patches.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ function applyPatches(/** @type {ModUtils} */ { replace, replaceOne, replaceRawC
replaceOne(/(\(22,"logo",8,")[^"]+"\)/g, "$1" + assets.smallLogo + "\")");

// Add update information
replaceRawCode(`new k("🚀 New Game Update","The game was updated! Please reload the game.",!0,[`,
`new k("🚀 New Game Update","The game was updated! Please reload the game."
replaceRawCode(`new k("🚀 New Game Update","The game was updated! Please reload the game. An internet connection is required.",!0,[`,
`new k("🚀 New Game Update","The game was updated! Please reload the game. An internet connection is required."
+ "<div style='border: white; border-width: 1px; border-style: solid; margin: 10px; padding: 5px;'><h2>FX Client is not yet compatible with the latest version of the game.</h2><p>Updates should normally be available within a few hours.<br>You can still use FX to play in singleplayer mode.</p></div>",!0,[`
);

Expand Down
8 changes: 4 additions & 4 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"version": "0.6.29",
"lastUpdated": "August 13",
"version": "0.6.29.1",
"lastUpdated": "September 4",
"changes": [
"Merged PR #30 by QZxV4: Added gamemode filtering to the IP highlighting feature (now it only checks for IP hash overlap in within the same lobby room)"
"Patches for the recent game updates (Merged PR #32 by QZxV4)"
],
"isSignificant": true
"isSignificant": false
}