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.
19 lines
866 B
TypeScript
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,
|
|
]);
|
|
}
|