Skip to content

five-on-it / packages/protocol/src/chaos / parseChaos

Function: parseChaos() ​

parseChaos(text): { bascules: number[]; billboards: object[]; pumps: ("out" | "burning" | "fine")[]; riots: object[]; tick: number; type: "chaos"; } | undefined

Defined in: packages/protocol/src/chaos.ts:52

Parses a text frame as the room's chaos; undefined when it is not one.

Parameters ​

text ​

string

Returns ​

Type Literal ​

{ bascules: number[]; billboards: object[]; pumps: ("out" | "burning" | "fine")[]; riots: object[]; tick: number; type: "chaos"; }

bascules ​

bascules: number[]

The tick each bascule leaf began to rise, by its index in the level; −1 lowered.

billboards ​

billboards: object[]

The billboards showing a wanted player's face: the placement's index, the player's client id.

pumps ​

pumps: ("out" | "burning" | "fine")[]

Each pump's state (PUMP_STATES), by its index among the level's pumps.

riots ​

riots: object[]

The riots under way: where (m) and how wide (m).

tick ​

tick: number

The server's tick as it sent this: what the raisings' ticks are counted from (a client's world counts its own).

type ​

type: "chaos"


undefined