ScenarioFile beta
TypeAlias of @v12-engine/engine
ts
export type ScenarioFile = {
format: number;
name: string;
game: string;
description?: string;
} & ({
kind: 'map';
map: MapFile;
} | {
kind: 'save';
save: string;
});A situation for a test to start from, set up in the editor: a map made for it, or a world saved at the moment that matters (in the editor's play mode). Kept in the tests' scenarios (<scenarios>/<game>/<name>.scenario.json: tests/scenarios unless the project says otherwise), or in a game's folder, and loaded with what was named in the editor found by name. It says which format it was saved with, and is brought up to date like a map (readScenario): one that no longer loads fails its test with what is wrong