Skip to content

1681-engine / index / DialogueOptions

Interface: DialogueOptions ​

Defined in: src/dialogue/DialogueRunner.ts:4

Properties ​

functions? ​

ts
optional functions?: Record<string, (...args) => ExprValue>;

Defined in: src/dialogue/DialogueRunner.ts:8

Functions an expression may call, beside the built-in visited(node) and chose(node, index).


onCommand? ​

ts
optional onCommand?: (name, args, runner) => void;

Defined in: src/dialogue/DialogueRunner.ts:10

A do command: what the game does for it.

Parameters ​

ParameterType
namestring
argsreadonly unknown[]
runnerDialogueRunner

Returns ​

void


translate? ​

ts
optional translate?: (text, key) => string;

Defined in: src/dialogue/DialogueRunner.ts:12

A line's or a choice's text in the player's language, before {…} is filled in (default as written).

Parameters ​

ParameterType
textstring
keystring | undefined

Returns ​

string


vars? ​

ts
optional vars?: Record<string, unknown>;

Defined in: src/dialogue/DialogueRunner.ts:6

The variables conditions read and set writes; shared with the game (default a fresh object).

Released under the MIT License.