From 5669e49114f9ba6e2b5475d65dcc0d427e563e94 Mon Sep 17 00:00:00 2001 From: QZxV4 <197156959+QZxV4@users.noreply.github.com> Date: Tue, 1 Sep 2026 21:47:49 +0100 Subject: [PATCH 1/2] patches for latest update --- patches/misc.js | 11 +++++++++++ patches/patches.js | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/patches/misc.js b/patches/misc.js index afd72e7..c579359 100644 --- a/patches/misc.js +++ b/patches/misc.js @@ -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); diff --git a/patches/patches.js b/patches/patches.js index 6f39ab2..35aacb7 100644 --- a/patches/patches.js +++ b/patches/patches.js @@ -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." + "
Updates should normally be available within a few hours.
You can still use FX to play in singleplayer mode.