Files
WT-Offline/packages/local-service/src/profile/profile-upgrades.ts
T
N0VAN0M4LY 2fc28dd7a5 Grant reserve vehicles and support crew presets
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.
2026-11-24 14:18:02 +08:00

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),
]);
}