feat(accounts)!: require explicit local account registration

Open the local signup page in the game's embedded browser before sign-in. Return the existing login error for unknown accounts or invalid passwords.

BREAKING CHANGE: First-time players must register in the game's signup window or create a save in the launcher before signing in. Existing accounts can sign in with their saved credentials.
This commit is contained in:
N0VAN0M4LY committed 2026-11-29 18:00:21 +08:00
1 parent d20b7f4249
commit d043a8f0f8
23 files changed
+134 -32

No files matched your search

+2 -1
View File
@@ -27,6 +27,7 @@ export interface CharPackResult {
export interface CharPackOptions {
/** Store the placeholder decal index (false when the player's own web cache is copied). */
readonly placeholderDecals: boolean;
readonly localRegistration: boolean;
}
export function rebuildCharPack(stockPack: Uint8Array, endpoint: LocalEndpoint, options: CharPackOptions): CharPackResult {
@@ -35,7 +36,7 @@ export function rebuildCharPack(stockPack: Uint8Array, endpoint: LocalEndpoint,
let revealedVehicles = 0;
const decals = options.placeholderDecals ? offlineDecalIndex(readPackBlk(stockPack, DECALS_CONFIG_PATH)) : undefined;
const pack = editPackBlks(stockPack, [
{ path: NETWORK_CONFIG_PATH, edit: (root) => { network = redirectNetworkConfig(root, endpoint); } },
{ path: NETWORK_CONFIG_PATH, edit: (root) => { network = redirectNetworkConfig(root, endpoint, options.localRegistration); } },
{ path: GAME_SETTINGS_PATH, edit: (root) => { features = enableFeaturesForEveryone(root, OFFLINE_FEATURES); } },
{ path: SHOP_PATH, edit: (root) => { revealedVehicles = revealHiddenVehicles(root); } },
], decals?.files ?? []);