Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HeliSabotageSystem<RoomType>

Represents a system responsible for handling communication sabotages on The Skeld and Polus.

See HeliSabotageSystemEvents for events to listen to.

Type parameters

  • RoomType: Hostable

Hierarchy

Implements

Index

Methods

Deserialize

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

Detoriorate

  • Detoriorate(delta: number): void

HandleRepair

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

HandleSabotage

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

Serialize

closeConsole

  • closeConsole(consoleId: number): Promise<void>
  • Mark the console as no longer being used by your player.

    Parameters

    • consoleId: number

      The ID of the console to mark as not being used.

    Returns Promise<void>

closeConsoleAs

  • closeConsoleAs(consoleId: number, player: PlayerData<Hostable<any>>): Promise<void>

completeConsole

  • completeConsole(consoleId: number): Promise<void>

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<HeliSabotageSystemEvents<Hostable<any>>[EventName]>): void
  • off<K>(event: string, listener: Listener<K>): void
  • Type parameters

    • EventName: "doors.open" | "doors.close" | "system.sabotage" | "system.repair" | "heli.consoles.open" | "heli.consoles.reset" | "heli.consoles.close" | "heli.consoles.complete"

    Parameters

    Returns void

  • Type parameters

    Parameters

    • event: string
    • listener: Listener<K>

    Returns void

on

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

    • EventName: "doors.open" | "doors.close" | "system.sabotage" | "system.repair" | "heli.consoles.open" | "heli.consoles.reset" | "heli.consoles.close" | "heli.consoles.complete"

    Parameters

    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<HeliSabotageSystemEvents<Hostable<any>>[EventName]>): () => void
  • once<K>(event: string, listener: Listener<K>): () => void
  • Type parameters

    • EventName: "doors.open" | "doors.close" | "system.sabotage" | "system.repair" | "heli.consoles.open" | "heli.consoles.reset" | "heli.consoles.close" | "heli.consoles.complete"

    Parameters

    Returns () => void

      • (): void
      • Returns void

  • Type parameters

    Parameters

    • event: string
    • listener: Listener<K>

    Returns () => void

      • (): void
      • Returns void

openConsole

  • openConsole(consoleId: number): Promise<void>

openConsoleAs

  • openConsoleAs(consoleId: number, player: PlayerData<Hostable<any>>): Promise<void>

patch

removeAllListeners

  • removeAllListeners(): void

removeListeners

  • removeListeners(event: string): void

repair

  • repair(): Promise<void>

sabotage

  • sabotage(): Promise<void>

wait

  • Type parameters

    • EventName: "doors.open" | "doors.close" | "system.sabotage" | "system.repair" | "heli.consoles.open" | "heli.consoles.reset" | "heli.consoles.close" | "heli.consoles.complete"

    Parameters

    • event: EventName

    Returns Promise<HeliSabotageSystemEvents<Hostable<any>>[EventName]>

  • Parameters

    • event: string

    Returns Promise<BasicEvent>

waitf

  • Type parameters

    • EventName: "doors.open" | "doors.close" | "system.sabotage" | "system.repair" | "heli.consoles.open" | "heli.consoles.reset" | "heli.consoles.close" | "heli.consoles.complete"

    Parameters

    Returns Promise<HeliSabotageSystemEvents<Hostable<any>>[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>

Properties

activeConsoles

activeConsoles: Map<number, number>

completedConsoles

completedConsoles: Set<number>

countdown

countdown: number

resetTimer

resetTimer: number

systemType

systemType: SystemType

Constructors

constructor

Accessors

dirty

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

room

  • get room(): RoomType

sabotaged

  • get sabotaged(): boolean

Generated using TypeDoc