EverambleGAME API / 1

CONTENT CONTRACT · VERSION 1

SwitchChangedEvent

A placed switch or fire changed state: a lever pulled, a plate pressed or released, a strike switch struck, a timed window run out, a fire lit or gone out, a burnable burnt or cut away.

Signature

{ active: boolean, actor: (ActorRef)?, definition: StructureId, kind: "switch_changed", player: (PlayerRef)?, position: Position, structure: ActorRef, variable: VariableId }

Fields

NameTypeMeaning
activebooleanTrue: it turned active (pressed, lit, burnt away); false: it turned back.
actorActorRefActor that changed it; absent when it changed by itself (a window ran out, a fire spread, a reset).
Length: 1…256; Pattern: ^[\s\S]+$
definitionStructureIdIts structure definition.
Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: structure
kind"switch_changed"Discriminant
playerPlayerRefPlayer controlling that actor; absent otherwise.
Length: 1…256; Pattern: ^[\s\S]+$
positionPositionWhere it stands.
structureActorRefThe switch or fire.
Length: 1…256; Pattern: ^[\s\S]+$
variableVariableIdWorld variable of its placement, now holding the new state.
Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: variable