Skip to content

EditorObjectives beta ​

Class of @v12-engine/editor

ts
export declare class EditorObjectives

The map's objectives (campaign plan EQ3): a list kept in its data (GameMap.data.objectives, MapObjective) that the map objectives pack gives (mapObjectives): at the start to every player a person plays, or by a rule by id. Each change one step of the history. What the Objectives panel does, in code; questLog is what its preview shows

A part of the editor, as it gives it (editor.objectives)

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the EditorObjectives class.

Members ​

add ​

ts
add(objective?: Partial<MapObjective>): number;

Adds an objective at the end: given at the start, with an id of its own (objective.<n>) and words to change, or what objective says of it. Gives back its place

given ​

ts
given(): boolean;

Whether the game gives the map's objectives: it has the map objectives pack (mapObjectives)

indexOf ​

ts
indexOf(which: number | string): number;

The place of an objective in the list, by its place or by its id (the first with it): -1 for none

list ​

ts
list(): MapObjective[];

The map's objectives, in the order it gives them, as it keeps them: one with no id or no words too

move ​

ts
move(from: number, to: number): void;

Moves an objective to another place in the list: the order they are given and shown in

questLog ​

ts
questLog(): ObjectiveInfo[];

The map's objectives as the quest log shows them once given (QuestLog): open, in the view's words

remove ​

ts
remove(which: number | string): void;

Takes an objective away, by its place or its id

set ​

ts
set(which: number | string, change: Partial<MapObjective>): void;

Changes an objective, by its place or its id: detail: undefined takes away what more it says

words ​

ts
words(text: MessageRef | undefined): string;

What words say, in the view's: a message key the game has words for (GameView.hud.messages), else as it is