five-on-it / packages/missions/src/phone / phoneAction
Function: phoneAction()
phoneAction(
phone,ctx,action):boolean
Defined in: packages/missions/src/phone.ts:483
The phone side of an action of the mission; false for an action that is not the phone's.
Parameters
phone
ctx
action
{ showText: string; } | { sendMessage: { from: string; id?: string; text: string; }; } | { setFlag: string; } | { clearFlag: string; } | { startTimer: { id: string; seconds: number; }; } | { stopTimer: string; } | { add: { counter: string; value: number | { counter: string; } | { timeLeft: true; } | { elapsed: true; } | { count: { players: { caught?: true; group?: string; in?: string; near?: { place: string; radius: number; }; tag?: string; team?: string; }; } | { enemies: { caught?: true; group?: string; in?: string; near?: { place: string; radius: number; }; tag?: string; team?: string; }; } | { vehicles: { caught?: true; group?: string; in?: string; near?: { place: string; radius: number; }; tag?: string; team?: string; }; } | { items: { caught?: true; group?: string; in?: string; near?: { place: string; radius: number; }; tag?: string; team?: string; }; }; } | { distance: ["player" | { actor: string; } | { place: string; } | { team: string; }, "player" | { actor: string; } | { place: string; } | { team: string; }]; } | { health: "player" | { actor: string; } | { place: string; } | { team: string; }; } | { wanted: true; } | { phaseOf: string; } | { phase: "search" | "normal" | "alert" | "caution" | "suspicious"; } | { kills: true; } | { alerts: true; } | { seen: true; } | { form: string; } | { time: true; }; }; } | { set: { counter: string; value: number | { counter: string; } | { timeLeft: true; } | { elapsed: true; } | { count: { players: { caught?: true; group?: string; in?: string; near?: { place: string; radius: number; }; tag?: string; team?: string; }; } | { enemies: { caught?: true; group?: string; in?: string; near?: { place: string; radius: number; }; tag?: string; team?: string; }; } | { vehicles: { caught?: true; group?: string; in?: string; near?: { place: string; radius: number; }; tag?: string; team?: string; }; } | { items: { caught?: true; group?: string; in?: string; near?: { place: string; radius: number; }; tag?: string; team?: string; }; }; } | { distance: ["player" | { actor: string; } | { place: string; } | { team: string; }, "player" | { actor: string; } | { place: string; } | { team: string; }]; } | { health: "player" | { actor: string; } | { place: string; } | { team: string; }; } | { wanted: true; } | { phaseOf: string; } | { phase: "search" | "normal" | "alert" | "caution" | "suspicious"; } | { kills: true; } | { alerts: true; } | { seen: true; } | { form: string; } | { time: true; }; }; } | { spawn: { at?: string; count?: number; group: string; }; } | { setWanted: number; } | { give: { count: number; item: string; }; } | { take: { count?: number; tag: string; }; } | { lock: { door: string; }; } | { unlock: { door: string; }; } | { lockVehicle: string; } | { unlockVehicle: string; } | { giveKey: string; } | { spawnItem: { at: string; count: number; item: string; }; } | { alert: { npc?: string; }; } | { calm: { npc?: string; }; } | { cameraOff: { camera: string; }; } | { cameraOn: { camera: string; }; } | { reward: { cash: number; rep: number; }; } | { complete: true; } | { fail: true | { text: string; }; } | { win: string; } | { message: { choices?: Reply[]; from: string; id?: string; text: string; }; } | { call: { dialogue: string; from: string; }; } | { addContact: { contact: string; dialogue?: string; }; } | { removeContact: string; } | { installApp: string; } | { removeApp: string; } | { waypoint: string; } | { clearWaypoint: true; } | { setClock: string; } | { setPace: number; } | { setWeather: { intensity: number; kind: "clear" | "overcast" | "rain" | "storm" | "fog" | "snow"; minutes?: number; over: number; }; } | { skipTime: { hours: number; text?: string; }; } | { setSignal: { group?: "north-south" | "east-west"; junction: string; seconds?: number; state: "green" | "red" | "flashing" | "auto"; }; }
Returns
boolean