feat(store): open store pages in-game and centralize economy tuning

Use the native embedded browser and pass the game language through
auto_local. Share web assets and extract vehicle icons, flags, and
localized names from the installed client.

Load and validate per-domain JSONC tuning and merge local overrides
by field. Use official store USD prices for GJN products, keep GJN
balances in integer cents, and split the native and web store
handlers by protocol. Multi-vehicle packs are still listed as single
vehicles at this point.

Type checking, patch checks, and configuration loading passed.
In-game acceptance is pending.
This commit is contained in:
N0VAN0M4LY committed 2026-11-25 11:01:05 +08:00
1 parent 8d9cca9d05
commit 9cf7df5299
74 files changed
+2904 -1455

No files matched your search

@@ -27,8 +27,10 @@ export function redirectNetworkConfig(root: BlkBlock, endpoint: LocalEndpoint):
function configureEnvironment(environment: BlkBlock, endpoint: LocalEndpoint): void {
setParam(environment, 'enableSslCertCheck', { type: 'bool', value: false });
// Open the local web store directly without SSO redirection to login.gaijin.net.
setParam(environment, 'webstoreURL', { type: 'string', value: `http://${endpoint.host}:${endpoint.port}/store` });
// The local store page. The stock value carries URL tags; here only
// auto_local, so scripts/onlineShop/url.nut adds ?skin_lang=<game language> and opens it in
// the built-in browser. No auto_login: that goes through Gaijin's login.gaijin.net.
setParam(environment, 'webstoreURL', { type: 'string', value: `auto_local http://${endpoint.host}:${endpoint.port}/store` });
const login = ensureBlock(environment, 'yuplay');
for (const [key, value] of loginOverrides(endpoint)) setParam(login, key, { type: 'string', value });
}