CampaignProgress beta
Interface of @v12-engine/engine
export interface CampaignProgress<D extends object = Record<string, unknown>>How far a campaign has got, as plain data to keep between games: the mission it is at, the missions won and how long each took, the heroes carried out of the last one won, and the game's own state of it (data, of the type D the campaign says: choices made, gold saved up, the units that go on; what each mission won carries, merged in). It says which format it is in, so that what was kept is read again when the format changes
Members
at
at: string;The mission to play next
campaign
campaign: string;The campaign it is of, by id
data
data: Partial<D>;The game's own, plain data: what the missions won carried (MissionDef.carry), each mission's keys over the ones before
difficulty
difficulty?: string;The difficulty chosen for it (CampaignDef.difficulties), by name: its missions' computers play on it
done
done: Record<string, MissionResult>;Missions won, by id
format
format: number;The version of the progress file's format, so what was kept is read again when the format changes
heroes
heroes: HeroRecord[];The heroes carried into the next mission