Files
WT-Offline/packages/local-service/src/profile/profile-upgrades.ts
T
N0VAN0M4LY e5452e925f feat(saves): seed new saves and reveal eligible hidden vehicles
Set initial Silver Lions and Golden Eagles balances and add a save
editing command. Open rank I for each nation and branch and migrate
older saves to format 3. Reveal eligible hidden vehicles while keeping
split air-defense launchers out of the tech tree.

Document the currency, rank, and unit status fields observed in the offline client.
2026-11-24 14:45:28 +08:00

19 lines
866 B
TypeScript

/**
* The save format's upgrade steps (saves/save-upgrades.ts), in version order. A later change
* to what saves hold adds a new step; released steps are not removed.
*/
import { SaveUpgrades } from '../saves/save-upgrades.ts';
import { applyStartingContent, type StartingContent } from './starting-content.ts';
export function profileUpgrades(content: StartingContent): SaveUpgrades {
// Applying the starting content is idempotent, so each step brings the save up to the
// starting content of this release.
const addStartingContent = (profile: Parameters<typeof applyStartingContent>[0]): void => applyStartingContent(profile, content);
return new SaveUpgrades([
// 1 -> 2: reserve vehicles of every branch, completed difficulty-gating tutorials.
addStartingContent,
// 2 -> 3: rank I open in every branch.
addStartingContent,
]);
}