Skip to content

five-on-it / packages/protocol/src/police / encodePolice

Function: encodePolice() ​

encodePolice(message): string

Defined in: packages/protocol/src/police.ts:226

Serializes a player's police tells as a text frame.

Parameters ​

message ​

camera ​

boolean = ...

A security or traffic camera has the player in sight now.

claw? ​

{ presses: number; seconds: number; } = ...

In a ComplianceBot's claw: the seconds before the arrest, and the presses of the interaction key still to struggle free.

claw.presses ​

number = ...

claw.seconds ​

number = ...

drone ​

boolean = ...

The police drone has the player in sight now.

hack? ​

number = ...

The seconds left of the kill switch's countdown on the player's car (eight stars), while it counts down.

k9? ​

"scent" | "lost" = ...

A police dog after the player: on their scent, or off it (the trail broken in water).

lasers ​

object[] = ...

The marksmen's lasers painting the player now.

light ​

boolean = ...

The helicopter's searchlight has the player now.

marks ​

object[] = ...

What the minimap marks.

radio ​

object[] = ...

The radio's last lines the player hears, oldest first.

scanner ​

boolean = ...

The player carries the police scanner (PoliceScan Pro™).

talk? ​

{ car: boolean; seconds: number; state: "ringing" | "talking"; time: boolean; } = ...

The negotiator's call (six stars, a captive held): ringing (seconds it rings on), the talk open (its choices still on offer: more time, once; a car, once) and the team holding (seconds of holding left).

talk.car ​

boolean = ...

talk.seconds ​

number = ...

talk.state ​

"ringing" | "talking" = ...

talk.time ​

boolean = ...

tech? ​

{ backdoor: boolean; battery: number; cruiser: number; fried: boolean; hacking: number; jammer: boolean; jamming: boolean; lawyer: number; loop: number; scout: number; smoked: boolean; tipped: boolean; traffic: number; } = ...

The player's own tech, for the phone's apps.

tech.backdoor ​

boolean = ...

tech.battery ​

number = ...

tech.cruiser ​

number = ...

tech.fried ​

boolean = ...

tech.hacking ​

number = ...

tech.jammer ​

boolean = ...

tech.jamming ​

boolean = ...

tech.lawyer ​

number = ...

tech.loop ​

number = ...

tech.scout ​

number = ...

tech.smoked ​

boolean = ...

tech.tipped ​

boolean = ...

tech.traffic ​

number = ...

tracked ​

boolean = ...

The car the player sits in carries a GPS tag.

type ​

"police" = ...

Returns ​

string