Skip to content

OwnStep beta ​

Interface of @v12-engine/editor

ts
export interface OwnStep

A step of a game's own in the history (editor.history.step, editor-panels E1): something that is not of the map (a wave in the game's waves.json, a tuned effect in fx.json, a value of a panel's) done and taken back with the map's own steps, by Ctrl+Z and the History drawer. do is run as the step is made, and again when it is redone; undo takes it back. Made while a change of the map is being made (editor.edit, begin/commit), it joins it: one step undoes both. Steps with the same merge key made one after another are one step (a drag of a slider): the first's undo, the last's do. What do and undo close over is theirs to keep right: a step that holds what the file was and what it became

Members ​

do ​

ts
do(): void;

Runs the step, when it is made and again when it is redone

merge ​

ts
merge?: string;

The key that joins steps made one after another into one step, such as a drag of a slider; none keeps it alone

name ​

ts
name: string;

What was done, as the undo list says it: "Set wave 3 to 12 skeletons"

undo ​

ts
undo(): void;

Takes the step back