Skip to content

five-on-it / apps/client/src/ui/phone-view / buttonsOf

Function: buttonsOf() ​

buttonsOf(ui, phone, radio?, jobs?, scanner?, police?, techState?, cops?): PhoneButton[]

Defined in: apps/client/src/ui/phone-view.ts:277

The buttons of what shows, in the order the panel numbers them (the radio's when it has stations; the Jobs app's when the phone is in the city: jobs, none in a run's room; the police scanner's when the player carries one: scanner; the Tech page's when they have tech of their own: tech; the Dispatch app's when they play the police and the Bounties page's when their bounty board is on: cops); the negotiator's call over all of it while one is on (police).

Parameters ​

ui ​

PhoneUi

phone ​

{ apps: object[]; calls: object[]; camera?: { note?: "subject" | "missed" | "away" | "saved"; shots: number; }; contacts: object[]; has: boolean; messages: object[]; screen?: { app: string; buttons: object[]; form: object[]; kind: "app" | "keypad"; name: string; note?: string; noteKey?: "wrongCode" | "nothing"; source: "phone" | "world"; text: string; title?: string; }; talk?: { choices: object[]; dialogue: string; goesOn: boolean; line?: string; note?: string; speaker?: string; state: "ringing" | "talking"; via: "call" | "face"; with: string; }; type: "phone"; unread: number; waypoint?: { label?: string; x: number; z: number; }; } | undefined

radio? ​

PhoneRadio

jobs? ​

JobsView

scanner? ​

ScannerView

police? ​

PoliceCallView

techState? ​

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 = ...

cops? ​

bounties ​

{ list: object[]; on: boolean; } = ...

Whether their bounty board is on, and the room's bounties when it is.

bounties.list ​

object[] = ...

bounties.on ​

boolean = ...

cop? ​

{ budget: number; costs: number[]; cuff?: { client: number; progress: number; }; dispatcher: boolean; last?: { answer: "rate" | "cooldown" | "failed" | "budget" | "ok" | "notCop" | "dispatcherOnly" | "noSuspect" | "noRoad" | "noBuilding" | "room"; n: number; order: "swat" | "roadblock" | "drone" | "cruiser"; }; max: number; ready: number[]; suspects: object[]; units: object[]; } = ...

Their dispatch, when they play the police.

cop.budget ​

number = count

The team's budget now and at most (points).

cop.costs ​

number[] = ...

What each order costs (points), in COP_ORDERS' order.

cop.cuff? ​

{ client: number; progress: number; } = ...

The cuffs under way: the robber's client id and how far along (0 to 1).

cop.cuff.client ​

number = ...

cop.cuff.progress ​

number = ...

cop.dispatcher ​

boolean = ...

Whether they took the Dispatcher's role (P2: orders at a point of the map).

cop.last? ​

{ answer: "rate" | "cooldown" | "failed" | "budget" | "ok" | "notCop" | "dispatcherOnly" | "noSuspect" | "noRoad" | "noBuilding" | "room"; n: number; order: "swat" | "roadblock" | "drone" | "cruiser"; } = ...

The answer to the cop's last order, and its number (one more each order).

cop.last.answer ​

"rate" | "cooldown" | "failed" | "budget" | "ok" | "notCop" | "dispatcherOnly" | "noSuspect" | "noRoad" | "noBuilding" | "room" = ...

cop.last.n ​

number = count

cop.last.order ​

"swat" | "roadblock" | "drone" | "cruiser" = ...

cop.max ​

number = count

cop.ready ​

number[] = ...

The seconds before each order is the team's again, in COP_ORDERS' order.

cop.suspects ​

object[] = ...

The robbers the police know of: where they last placed them (m), their stars, how long ago (s).

cop.units ​

object[] = ...

The backup the team called that is still out: what, where (m), its seconds left.

transports ​

object[] = ...

The transports they ride or could stop.

type ​

"cops" = ...

Returns ​

PhoneButton[]