Fix cloud settings replies and persist skipped tutorials

Return the unframed BLK expected by the cloud settings client.
Allow the basic ground tutorial to be skipped and save the tutorial
preference immediately.
This commit is contained in:
N0VAN0M4LY committed 2026-11-25 22:46:35 +08:00
1 parent 533a263d6e
commit 7ef442271f
4 files changed
+63 -12

No files matched your search

@@ -5,10 +5,12 @@
* condition:t="" means every player has it (the UI scripts ask with hasFeature, which falls
* back to the native local_player_has_feature, scripts/user/features.nut).
*
* AllowedToSkipBaseTutorials: lets the player skip the base tutorials. The stock tutorial
* offer (scripts/tutorials/nextTutorialHandler.nut) enables its skip and close buttons only
* with this feature (tutorialsData.nut canSkipByFeature). The offline version makes the
* tutorial optional (local verification).
* AllowedToSkipBaseTutorials / AllowedToSkipBaseTankTutorials: let the player skip or close
* every branch's base tutorial offer. `scripts/tutorials/tutorialsData.nut` gates air and naval
* base tutorials on `AllowedToSkipBaseTutorials` and ground base tutorials (`lightTank`,
* `lightTank_action`) on `AllowedToSkipBaseTankTutorials`; without both, `NextTutorialHandler`
* hides its "do not ask me again" checkbox and close button until the tutorial is started once
* (local verification).
*
* PaymentMethods: lets scripts/onlineShop/onlinePurchase.nut offer GJN payment directly
* inside the Golden Eagles and Premium Account windows (stock game_settings.blk restricts it
@@ -18,7 +20,11 @@ import { ensureBlock, setParam, type BlkBlock } from '@wto/blk';
export const GAME_SETTINGS_PATH = 'config/game_settings.blk';
export const OFFLINE_FEATURES: readonly string[] = ['AllowedToSkipBaseTutorials', 'PaymentMethods'];
export const OFFLINE_FEATURES: readonly string[] = [
'AllowedToSkipBaseTutorials',
'AllowedToSkipBaseTankTutorials',
'PaymentMethods',
];
/** Give every player the features; returns the ones that were not on for everyone before. */
export function enableFeaturesForEveryone(gameSettings: BlkBlock, names: readonly string[]): string[] {