Skip to content

EditorSharedValues beta ​

Interface of @v12-engine/editor

ts
export interface EditorSharedValues

The editor's shared values by key, each with its type: the editor's own, and a game's. A game adds its own by declaration merging, as EditorEvents, so editor.shared('td.wave', 0) knows what the wave is:

ts
declare module '@v12-engine/editor' {
	interface EditorSharedValues {
		'td.wave': number
	}
}

The editor's own: play.as (the player the map is played here as, none for the first) and play.revealed (without the fog), what the Play menu sets; play.panels (the panels of Play here open as it last stopped); play.cheats (what the Cheats panel picked)

Members ​

"content.carried" ​

ts
'content.carried': string | undefined;

What was dragged out of the Content drawer, to be kept as used once the scene takes it (droppedFromContent)

"generate.last" ​

ts
'generate.last': Omit<GeneratorOptions, 'seed'> | undefined;

What New map from a generator was set to last, for the next time it opens: the size, players, symmetry and parameters

"play.as" ​

ts
'play.as': number | undefined;

The player the map is played as in Play here; none plays as the first

"play.cheats" ​

ts
'play.cheats': PlayCheats;

What the Cheats panel of Play here picked (how much, what to spawn, which item, what level), for its keys too. Kept

"play.panels" ​

ts
'play.panels': string[];

The panels of Play here (when: 'play') open as it last stopped: opened by themselves as it starts again. Kept

"play.revealed" ​

ts
'play.revealed': boolean;

Whether Play here shows the map without the fog of war