five-on-it / packages/protocol/src/chaos / encodeChaos
Function: encodeChaos()
encodeChaos(
message):string
Defined in: packages/protocol/src/chaos.ts:47
Serializes the room's chaos as a text frame.
Parameters
message
bascules
number[] = ...
The tick each bascule leaf began to rise, by its index in the level; −1 lowered.
billboards
object[] = ...
The billboards showing a wanted player's face: the placement's index, the player's client id.
pumps
("out" | "burning" | "fine")[] = ...
Each pump's state (PUMP_STATES), by its index among the level's pumps.
riots
object[] = ...
The riots under way: where (m) and how wide (m).
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
"chaos" = ...
Returns
string