Skip to content

EditableField beta ​

Interface of @v12-engine/engine

ts
export interface EditableField

A field of a definition the editor may change, and how it shows it

Members ​

group ​

ts
group?: string;

The heading it is shown under: the first part of its path, when left out (stats, cost)

hint ​

ts
hint?: string;

A line about it, shown when the pointer is over it

kind ​

ts
kind?: 'number' | 'integer' | 'text' | 'boolean' | 'choice' | 'either' | 'list' | 'id' | 'rows';

What it holds. What the definition has there now, when left out (a number where it has nothing). A list is of words, in order: ids of the kind of says, when it says. An id is one id of the kind of says (the hall a race starts with), picked from what the game has of that kind. rows is a list of things, each with fields of its own (effects.0.amount), added, taken out and put in another order whole: an ability's effects. An either is a value of more than one kind: yes or no, one of the words of options (origin.caster: true, false or otherwise), or a number as well where orNumber says (a missile's pierce: true, false or how many it goes through)

max ​

ts
max?: number;

Of a number or integer field, or the number of an either: the most it can be set to in the editor

min ​

ts
min?: number;

Of a number or integer field, or the number of an either: the least it can be set to in the editor

name ​

ts
name?: string;

What it is called in the editor: the last part of its path, when left out

of ​

ts
of?: DataKind;

Of a list or an id: the kind of definition its words are ids of (abilities for a unit's abilities)

one ​

ts
one?: boolean;

Of a list: one id or a list of them (a building's upgradesTo). Shown as a list either way; a list of one is kept as the one id

options ​

ts
options?: readonly string[];

What a choice can be; the words an either can be besides yes and no

orNumber ​

ts
orNumber?: 'number' | 'integer';

Of an either: it may be a number besides, any (number) or a whole one (integer). Not a number when left out

path ​

ts
path: string;

Where it is in the definition, by its fields: stats.health, cost.gold, bounty.0 (a place in a list)

step ​

ts
step?: number;

Of a number field, or the number of an either: the size of one step of the editor's input

types ​

ts
types?: readonly string[];

Of rows of effects: the types a row can be, those the game has (defineEffect). A row of no type when left out