Skip to content

LookArea beta ​

Class of @v12-engine/editor

ts
export declare class LookArea

How the map looks and sounds: its environment, grounds of its own, sounds, lights, effects, decals, wind, clouds, weather, mist and day

Members ​

constructor ​

ts
constructor(
    doc: MapDocument, ground: GroundArea);

Constructs a new instance of the LookArea class

add ​

ts
add<K extends PlacedKind>(kind: K, item: Omit<PlacedItems[K], 'id'>, name?: string): PlacedItems[K];

Puts one more of a list of the look down (PlacedKind): fitted on the map as its kind is (a place on it, a shape fitted, a reach and a loudness in range), with an id past the highest. One step of the history; given back with its id

addCliffLook ​

ts
addCliffLook(look?: Partial<Omit<MapCliffLook, 'id'>>, name?: string): number;

A new look of the walls of cliffs (MapCliffLook), strata where look says no shape, named by how many there are: its id, to paint it with (paintCliffLook, or the editor's brush: EditorClient.paintCliffLook). An id no look had and no cell holds; 0 when the map has 255 already

addDecal ​

ts
addDecal(at: Vec2, options: Partial<Omit<MapDecal, 'id' | 'x' | 'z'>> & {
        look: string;
    }): MapDecal;

Lays a decal on the ground at a place of the map (MapDecal): a scorch, a rune. Gives it back with its id

addFx ​

ts
addFx(at: Vec2, options: Partial<Omit<MapFx, 'id' | 'x' | 'z'>> & {
        fx: string;
    }): MapFx;

Puts an effect down at a place of the map (MapFx): a campfire, a chimney's smoke. Gives it back with its id

addLight ​

ts
addLight(at: Vec2, options?: Partial<Omit<MapLightSource, 'id' | 'x' | 'z'>>): MapLightSource;

Puts a light down at a place of the map (MapLightSource), over the ground: a lamp, a rune. Gives it back with its id

addTile ​

ts
addTile(tile: Omit<MapTile, 'id'>): MapTile | null;

A ground of the map's own to paint with (MapTile): its id made from its name, none of the game's or the map's. One step of the history. Null where the map holds as many tiles as it can

applyEnvironment ​

ts
applyEnvironment(preset: MapEnvironment, name?: string): void;

Puts a named look on the map (GameView.world.environments): every part of its look at once, one step; the map's sounds, grounds and cliffs kept

cliffLooks ​

ts
get cliffLooks(): readonly MapCliffLook[];

The map's looks of the walls of cliffs painted on them (MapCliff.looks)

cloudPatches ​

ts
get cloudPatches(): readonly MapCloudPatch[];

The patches of the cloud layer: none is all over the map

decals ​

ts
get decals(): readonly MapDecal[];

The map's decals (MapEnvironment.decals): marks laid on the ground

doc ​

ts
readonly doc: MapDocument;

The map document the area works on

fx ​

ts
get fx(): readonly MapFx[];

The map's effects (MapEnvironment.fx)

item ​

ts
item<K extends PlacedKind>(kind: K, id: number): PlacedItems[K] | undefined;

One of a list of the look, by its id

items ​

ts
items<K extends PlacedKind>(kind: K): readonly PlacedItems[K][];

The things of a list of the look (PlacedKind), as the map keeps them

lights ​

ts
get lights(): readonly MapLightSource[];

The map's lights (MapEnvironment.lights)

mist ​

ts
get mist(): MapMist | undefined;

Mist that lies on the ground and in places (MapMist), as the map has it

mistAreas ​

ts
get mistAreas(): readonly MapMistArea[];

The areas of mist, in their order (MapMist.areas)

ownTiles ​

ts
get ownTiles(): readonly MapTile[];

The map's own tiles (MapTile), to paint with past the game's

paintCliffLook ​

ts
paintCliffLook(id: number, area: AreaShape, name?: string): number;

Paints a look of the walls of cliffs on the cells whose middles are in area (MapCliff.looks, by its id), or takes the looks off them with 0, as the brush does: one step. How many cells it painted

remove ​

ts
remove(kind: PlacedKind, ids: Iterable<number>, name?: string): void;

Takes some of a list of the look away, by their ids, as one step

removeCliffLook ​

ts
removeCliffLook(id: number, name?: string): void;

Takes a look of the walls of cliffs away, and its paint off the cells it was on: one step

removeDecals ​

ts
removeDecals(ids: Iterable<number>): void;

Takes decals of the map away, by their ids, as one step

removeFx ​

ts
removeFx(ids: Iterable<number>): void;

Takes effects of the map away, by their ids, as one step

removeLights ​

ts
removeLights(ids: Iterable<number>): void;

Takes lights of the map away, by their ids, as one step

removeTile ​

ts
removeTile(id: string): void;

Takes a ground of the map's own away, and its paint with it: the ground is as unpainted there. One step of the history

set ​

ts
set<K extends PlacedKind>(kind: K, id: number, change: Partial<Omit<PlacedItems[K], 'id'>>, name?: string): void;

Changes one of a list of the look, by its id: what is given as undefined goes back to as it is when nothing is said

setCliff ​

ts
setCliff(change: Partial<Omit<MapCliff, 'tiles'>> | undefined, tile?: string, name?: string): void;

Changes the faces of the map's cliffs (MapCliff), field by field (undefined takes a field away): all of them over the game's rock, or with tile the walls of the cliffs whose top is painted with it (MapCliff.tiles). undefined for the change puts them back to the game's: all but those of their own tiles, or that tile's

setCliffLook ​

ts
setCliffLook(id: number, change: Partial<Omit<MapCliffLook, 'id'>>, name?: string): void;

Changes a look of the walls of cliffs (MapCliffLook), field by field: its name, its shape. One step

setCloudLayer ​

ts
setCloudLayer(change: Partial<MapCloudLayer> | undefined, name?: string): void;

Changes the cloud layer (MapCloudLayer), field by field; undefined takes it away

setDay ​

ts
setDay(day: MapDay, name?: string): void;

Changes the hour the map starts at and whether it moves (MapDay); an empty day is the game's

setDecal ​

ts
setDecal(id: number, change: Partial<Omit<MapDecal, 'id'>>, name?: string): void;

Changes a decal of the map, by its id: where it is, what it is, its turn, size, tint, fade...

setEnvironment ​

ts
setEnvironment(change: Partial<MapEnvironment>, name?: string): void;

Changes what the map looks like beyond its ground (MapEnvironment): its water, and later its light and sky. Each part is replaced as given; undefined puts a part back to the client's

setFx ​

ts
setFx(id: number, change: Partial<Omit<MapFx, 'id'>>, name?: string): void;

Changes an effect of the map, by its id: where it is, what it plays, its knobs, when it plays...

setGroundMist ​

ts
setGroundMist(change: Partial<MapGroundMist> | undefined, name?: string): void;

Changes the mist that lies on the ground, field by field; undefined takes it away

setLight ​

ts
setLight(id: number, change: Partial<Omit<MapLightSource, 'id'>>, name?: string): void;

Changes a light of the map, by its id: where it is, its colour, reach, when it is on...

setMist ​

ts
setMist(change: Partial<MapMist>, name?: string): void;

Changes the mist, part by part: the ground mist or the areas as given, undefined taking one away. No mist left is none

setTile ​

ts
setTile(id: string, change: Partial<Omit<MapTile, 'id'>>): void;

Changes a ground of the map's own: its name, picture, colour, size or turn (undefined: as when nothing is said). One step of the history

setWind ​

ts
setWind(change: Partial<MapWind> | undefined, name?: string): void;

Changes the wind (MapWind), field by field; undefined stills it

weatherAreas ​

ts
get weatherAreas(): readonly MapWeatherArea[];

The places the weather falls in (MapWeather.areas): none is all over the map

writer ​

ts
writer(kind: PlacedKind, named: Namer): CollectionWriter;

How what stands on the map in its look is written (CollectionWriter): the lights, effects, decals, sounds and the places of mist, weather and clouds