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 ​
| Parameter | Type |
|---|---|
name | string |
args | readonly unknown[] |
runner | DialogueRunner |
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 ​
| Parameter | Type |
|---|---|
text | string |
key | string | 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).