Skip to content

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

Function: parsePolice() ​

parsePolice(text): { camera: boolean; drone: boolean; marks: object[]; radio: object[]; scanner: boolean; type: "police"; } | undefined

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

Parses a text frame as a player's police tells; undefined when it is not one.

Parameters ​

text ​

string

Returns ​

Type Literal ​

{ camera: boolean; drone: boolean; marks: object[]; radio: object[]; scanner: boolean; type: "police"; }

camera ​

camera: boolean

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

drone ​

drone: boolean

The police drone has the player in sight now.

marks ​

marks: object[]

What the minimap marks.

radio ​

radio: object[]

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

scanner ​

scanner: boolean

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

type ​

type: "police"


undefined