MissionContext beta
Interface of @v12-engine/client/app
export interface MissionContext<D extends object = Record<string, unknown>>What a mission's start and carry are given: the map, the player at the screen, the campaign's progress as the mission began (progress.data: what the missions before carried), whether the game is new or loaded from a save, and the difficulty chosen for the campaign (CampaignDef.difficulties)
Members
difficulty
difficulty: string;The difficulty the campaign is played on, by name: the computers the mission seats play on it where their seat says none (world.computers.defaults, over the map's MapPlayer.data.ai.difficulty); the mission's own rules may read it too (more raiders on hard). Of a game loaded from a save, the one it was saved on
fresh
fresh: boolean;Whether the game is new, not loaded from a save, so the mission sets up its starting state
map
map: GameMap;The mission's map, as the campaign's maps gave it, a new copy for this play
player
player: PlayerId;The player the screen plays as on that map
progress
progress: CampaignProgress<D>;The campaign's progress as the mission began, with what the missions before carried in data