MapFiles beta
Interface of @v12-engine/editor/vite
export interface MapFilesWhat the engine says a map file is: how to read one, and how to write it and its names. Handed in, not imported: the config of the dev server loads this file, and the engine is loaded by the dev server once it runs
Members
DATA_KINDS
DATA_KINDS: readonly string[];The kinds of definition the engine keeps data of (DATA_KINDS): what the game's data is written of, and nothing else
gameIdsSource
gameIdsSource?(game: string, sources: GameIdSources): string;What the engine writes of a game's ids from its files (gameIdsSource): without it, <game>.ids.ts is not written
looksText
looksText?(file: Record<string, unknown>): string;Writes a looks file as the text of looks.json
mapNamesSource
mapNamesSource(stem: string, map: GameMap): string;The source of the generated names file for the map file stem, made from the map's objects
mapText
mapText(map: GameMap): string;Writes a map as the text of its file
parseMap
parseMap(data: unknown): GameMap;Reads a map from the parsed JSON of a map file; throws when the data is not a map
readLooksEntry
readLooksEntry?(data: unknown, what?: string): unknown;Checks and reads one entry of a looks.json from its parsed data; what names it in the error
readLooksFile
readLooksFile?(data: unknown): Record<string, unknown>;What the client says a looks.json is (packages/client/src/client/looksFile.ts): without them, the looks are not answered
readScenario
readScenario?(data: unknown): {
name: string;
game: string;
};What the engine says a scenario file is (readScenario): without it, scenarios are not written