Skip to content

CampaignFromFile beta ​

Interface of @v12-engine/client/app

ts
export interface CampaignFromFile<D extends object = Record<string, unknown>> extends Omit<CampaignDef<D>, 'id' | 'name' | 'missions'>

A campaign of a file (campaign plan EQ8): its campaign.json (file, as imported: checked as it is read) with what is code beside it. What the file says is over the code's: its id, name, menu words, difficulties, chapters, and each mission's fields, the missions in its order. A mission of the code's that the file has not got comes after, with a name and a map of its own

Members ​

file ​

ts
file: unknown;

The campaign's file, campaign.json: as imported (import campaignFile from './campaign.json'), or read already

id ​

ts
id?: string;

Its id and name where the file has none: the file's are over them

maps ​

ts
maps: (name: string) => GameMap;

A map by the name the file gives it (a mission's map): a new copy each time, as a game changes it

missions ​

ts
missions?: MissionCode<D>[];

What is code of its missions, by id

name ​

ts
name?: string;

The campaign's name where the file has none; the file's name is over it