Class ElectricalSwitchFlipEvent<RoomType>

Emitted when a player flips a switch while Electrical is sabotaged.

Type Parameters

Hierarchy

  • RevertableEvent
    • ElectricalSwitchFlipEvent

Implements

Properties

eventName: "electrical.switchflip"
eventName: "electrical.switchflip"
flipped: boolean

Whether this switch is flipped.

message: undefined | RepairSystemMessage

The message that this event originated from.

player: undefined | PlayerData<RoomType>

The player that flipped the switch. Only available if the client is the host.

reverted: boolean
room: RoomType

The room or client that the event came from.

switchId: number

The ID of the switch that was flipped (from left-to-right, starting at 0).

switchsystem: SwitchSystem<RoomType>

The electrical system that the event is for.

Accessors

  • get alteredFlipped(): boolean
  • The alternate value of the switch, if changed.

    Returns boolean

  • get alteredSwitchId(): number
  • The ID of the alternate switch to flip, if changed.

    Returns number

Constructors

  • Type Parameters

    Parameters

    • room: RoomType
    • switchsystem: SwitchSystem<RoomType>
    • message: undefined | RepairSystemMessage
    • player: undefined | PlayerData<RoomType>

      The player that flipped the switch. Only available if the client is the host.

    • switchId: number

      The ID of the switch that was flipped (from left-to-right, starting at 0).

    • flipped: boolean

      Whether this switch is flipped.

    Returns ElectricalSwitchFlipEvent<RoomType>

Methods

  • Returns void

  • Set whether the switch is flipped.

    Parameters

    • flipped: boolean

      Whether the switch is flipped.

    Returns void

  • Change the switch that was flipped.

    Parameters

    • switchId: number

      The ID of the switch to flip (from left-to-right, starting at 0).

    Returns void

Generated using TypeDoc