Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SystemStatus<DataT, T, RoomType>

Type parameters

Hierarchy

Index

Methods

Deserialize

  • Deserialize(reader: HazelReader, spawn: boolean): void

Detoriorate

  • Detoriorate(delta: number): void

HandleRepair

  • HandleRepair(player: undefined | PlayerData<Hostable<any>>, amount: number, rpc: undefined | RepairSystemMessage): Promise<void>

HandleSabotage

  • HandleSabotage(player: undefined | PlayerData<Hostable<any>>, rpc: undefined | RepairSystemMessage): Promise<void>

Serialize

emit

  • emit<Event>(event: Event): Promise<Event>

emitSerial

  • emitSerial<Event>(event: Event): Promise<Event>

emitSync

  • emitSync<Event>(event: Event): Event

getListeners

  • getListeners<Event>(event: string): Listener<Event>[]

off

  • off<EventName>(event: EventName, listener: Listener<T[EventName]>): void
  • off<K>(event: string, listener: Listener<K>): void
  • Type parameters

    • EventName: string | number | symbol

    Parameters

    • event: EventName
    • listener: Listener<T[EventName]>

    Returns void

  • Type parameters

    Parameters

    • event: string
    • listener: Listener<K>

    Returns void

on

  • on<EventName>(event: EventName, listener: Listener<T[EventName]>): () => void
  • on<K>(event: string, listener: Listener<K>): () => void
  • Type parameters

    • EventName: string | number | symbol

    Parameters

    • event: EventName
    • listener: Listener<T[EventName]>

    Returns () => void

      • (): void
      • Returns void

  • Type parameters

    Parameters

    • event: string
    • listener: Listener<K>

    Returns () => void

      • (): void
      • Returns void

once

  • once<EventName>(event: EventName, listener: Listener<T[EventName]>): () => void
  • once<K>(event: string, listener: Listener<K>): () => void
  • Type parameters

    • EventName: string | number | symbol

    Parameters

    • event: EventName
    • listener: Listener<T[EventName]>

    Returns () => void

      • (): void
      • Returns void

  • Type parameters

    Parameters

    • event: string
    • listener: Listener<K>

    Returns () => void

      • (): void
      • Returns void

removeAllListeners

  • removeAllListeners(): void

removeListeners

  • removeListeners(event: string): void

repair

  • repair(): Promise<void>

sabotage

  • sabotage(): Promise<void>

wait

  • wait<EventName>(event: EventName): Promise<T[EventName]>
  • wait(event: string): Promise<BasicEvent>

waitf

  • waitf<EventName>(event: EventName, filter: (ev: T[EventName]) => boolean | Promise<boolean>): Promise<T[EventName]>
  • waitf<K>(event: string, filter: (ev: K) => boolean | Promise<boolean>): Promise<BasicEvent>
  • Type parameters

    • EventName: string | number | symbol

    Parameters

    • event: EventName
    • filter: (ev: T[EventName]) => boolean | Promise<boolean>
        • (ev: T[EventName]): boolean | Promise<boolean>
        • Parameters

          • ev: T[EventName]

          Returns boolean | Promise<boolean>

    Returns Promise<T[EventName]>

  • Type parameters

    Parameters

    • event: string
    • filter: (ev: K) => boolean | Promise<boolean>
        • (ev: K): boolean | Promise<boolean>
        • Parameters

          • ev: K

          Returns boolean | Promise<boolean>

    Returns Promise<BasicEvent>

Constructors

constructor

Accessors

dirty

  • get dirty(): boolean
  • set dirty(isDirty: boolean): void

room

  • get room(): RoomType

sabotaged

  • get sabotaged(): boolean

Properties

systemType

systemType: SystemType

Generated using TypeDoc