InfoArea beta
Class of @v12-engine/editor
export declare class InfoAreaWhat the map says of itself and the game says of it: its name, forces, random groups, item tables, data and problems
Members
constructor
constructor(
doc: MapDocument);Constructs a new instance of the InfoArea class
describe
describe(change: {
name?: string;
description?: string;
}): void;Name and description
doc
readonly doc: MapDocument;The map document the area works on
hasCamps
get hasCamps(): boolean;Whether the game has creep camps to place (MapEditorDef.camps): when it has a unit with a bounty, unless it says
problems
problems(): MapProblem[];What is wrong with the map (checkMap): the editor's checks, then the game's
scatterTypes
scatterTypes(): string[];The unit types the scatter brush can put down (MapEditorDef.scatter): resources one cell big when the game does not say
setCliffHeight
setCliffHeight(height: number): void;How high a level of cliff is (GameMap.cliffHeight, 3 on a new map): every cliff of the map rises or sinks with it, and the ground is worked out again. Throws when it is not a number above 0
setData
setData(key: string, value: unknown): void;Keeps something with the map for the game's rules to read (GameMap.data), or takes it out with undefined. Throws when it is not plain data, saying where
setDefinitions
setDefinitions(definitions: GameData | undefined, name?: string): void;The map's own definitions (campaign plan RC8, GameMap.definitions), a data.json of the map: what the Data panel keeps here in its scope "This map". None takes them away
setForce
setForce(team: number, force: Omit<MapForce, 'team'> | undefined): void;Names a team and says what its players share (MapForce), or takes that away with nothing
setItemTables
setItemTables(tables: MapItemTable[], name?: string): void;The item tables of the map, all of them (MapItemTable): what things drop when they die
setMapInfo
setMapInfo(change: Partial<Pick<GameMap, 'author' | 'meantFor' | 'explored' | 'loading' | 'preview' | 'silence' | 'races'>>, name?: string): void;The map's own properties: who made it, who it is for, whether it starts explored, the loading screen, its picture, the races it offers
setRandomGroups
setRandomGroups(groups: MapRandomGroup[], name?: string): void;The random groups of the map, all of them (MapRandomGroup): what placed things can be drawn from when the game starts
strangers
strangers(): {
types: string[];
objects: MapObject[];
camps: MapCamp[];
};What is on the map that the game has no type for: a unit that was renamed in the code, a map made with a mod that is not on. It stays in the file, and no world is given it. types are the names, objects and camps what holds them