Derive reserve vehicles from the stock economy data. Grant all reserves and mark the basic takeoff and landing tutorials complete in new saves. Apply the same grants through the format 2 migration. Use shared crew slot rules for first-run selection, presets, training, assignment, and removal.
15 lines
640 B
TypeScript
15 lines
640 B
TypeScript
/**
|
|
* The save format's upgrade steps (saves/save-upgrades.ts), in version order. A step is
|
|
* never changed once released; a later change to saves adds a new step.
|
|
*/
|
|
import { SaveUpgrades } from '../saves/save-upgrades.ts';
|
|
import { applyStartingContent, type StartingContent } from './starting-content.ts';
|
|
|
|
export function profileUpgrades(content: StartingContent): SaveUpgrades {
|
|
return new SaveUpgrades([
|
|
// 1 -> 2: the starting content (reserve vehicles of every branch, completed
|
|
// difficulty-gating tutorials) for saves made before new accounts had it.
|
|
(profile) => applyStartingContent(profile, content),
|
|
]);
|
|
}
|