TerrainRulesArea beta
Class of @v12-engine/editor
export declare class TerrainRulesAreaPainting the tiles by height and slope (MF6): bands told once (apply), or kept live as the ground is shaped (TerrainRules.live). The brush's paint is untouched: the rule paints the cells the bands hold of, and leaves the others as they are
Members
constructor
constructor(
doc: MapDocument);Constructs a new instance of the TerrainRulesArea class
apply
apply(name?: string, bands?: readonly TerrainBand[]): number;Paints the cells by the bands once: one step of the history, named name. Returns how many cells changed. The cells no band holds of keep their paint
doc
readonly doc: MapDocument;The map document the area works on
preview
preview(bands?: readonly TerrainBand[]): (number | undefined)[];The tile each cell would have by the bands (undefined where none holds, or the tile is not on the map): the heights and slopes read off the ground as it is. A cell is z * width + x
rules
rules(): TerrainRules;The rule the map has now: no bands, and not live, where it has none
set
set(rules: TerrainRules): void;Sets the rule of the map: kept with it, no step of the history. A rule kept live paints at once