Skip to content

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

Function: encodePolice() ​

encodePolice(message): string

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

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.

lockdown? ​

{ budget: number; contractors: boolean; extraction?: { name: string; seconds?: number; x: number; z: number; }; legends: number; news?: { kind: "stars" | "tow" | "extraction" | "lockdown" | "unicorn" | "unitDown" | "overrun" | "restored"; n: number; place?: string; stars?: number; }; overrun: boolean; ring?: { r: number; sealed: boolean; x: number; z: number; }; safehouse?: "inside" | "raid" | "rented"; } = ...

The endgame (six to ten stars): see LockdownTells.

lockdown.budget ​

number = ...

lockdown.contractors ​

boolean = ...

lockdown.extraction? ​

{ name: string; seconds?: number; x: number; z: number; } = ...

lockdown.extraction.name ​

string = ...

lockdown.extraction.seconds? ​

number = ...

lockdown.extraction.x ​

number = ...

lockdown.extraction.z ​

number = ...

lockdown.legends ​

number = ...

lockdown.news? ​

{ kind: "stars" | "tow" | "extraction" | "lockdown" | "unicorn" | "unitDown" | "overrun" | "restored"; n: number; place?: string; stars?: number; } = ...

lockdown.news.kind ​

"stars" | "tow" | "extraction" | "lockdown" | "unicorn" | "unitDown" | "overrun" | "restored" = ...

lockdown.news.n ​

number = ...

lockdown.news.place? ​

string = ...

lockdown.news.stars? ​

number = ...

lockdown.overrun ​

boolean = ...

lockdown.ring? ​

{ r: number; sealed: boolean; x: number; z: number; } = ...

lockdown.ring.r ​

number = ...

lockdown.ring.sealed ​

boolean = ...

lockdown.ring.x ​

number = ...

lockdown.ring.z ​

number = ...

lockdown.safehouse? ​

"inside" | "raid" | "rented" = ...

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