SOURCE / PINNED RELEASE
Made of little things.
Pursuit PIT
- Release
- 565f4981bdc3…
- Author-recorded commit
- 197afdbed44b…
- License
- LICENSE
- Author’s source reference
- nostr://npub12lm3rxsva8kfempyjkxupt09e02n3fezurkyadyqfejdc5e0r2kscqty6r/wss%3A%2F%2Fgit.napplet.soy%2F/n-951414e7fd7
Archive hash verified: 3b0485589942fd5c…. The source-to-build association is the author’s claim; it has not been independently rebuilt.
// Paint colours the suspect's car can have, with the word Dispatch uses for each.
// Shared by the sim (which picks one per pursuit), the radio script (a recorded line per
// colour), the start card and the laptop.
export const SUSPECT_COLORS = [
{ name: 'orange', hex: 0xf28a1a },
{ name: 'red', hex: 0xc61f1f },
{ name: 'blue', hex: 0x2556c4 },
{ name: 'green', hex: 0x2f8a3e },
{ name: 'yellow', hex: 0xe8c21c },
{ name: 'white', hex: 0xeceae4 },
{ name: 'black', hex: 0x18191c },
{ name: 'silver', hex: 0xaab0b6 },
{ name: 'purple', hex: 0x6a3a9c },
] as const;
export type SuspectColor = (typeof SUSPECT_COLORS)[number]['name'];
export function randomSuspectColor(): SuspectColor {
return SUSPECT_COLORS[Math.floor(Math.random() * SUSPECT_COLORS.length)].name;
}
export function suspectHex(name: SuspectColor): number {
return SUSPECT_COLORS.find((c) => c.name === name)!.hex;
}
/** The colour word for a car's paint, if it is one of the suspect colours. */
export function colorName(hex: number): SuspectColor | undefined {
return SUSPECT_COLORS.find((c) => c.hex === hex)?.name;
}
