five-on-it / packages/ai/src/police-fittings
packages/ai/src/police-fittings
The cruisers' fittings at seven stars (GAME_DESIGN §12): the Grappler (C3) and the GPS dart launcher (C4), and what the police do with a car their dart tagged.
- The Grappler: as many cruisers after a player as the stars ask for (
police-ladder.ts'grapplers), the newest unfitted, carry its bumper net (@foi/sim'sgrappler.ts: the client draws it, glowing); their crews tail the player's car right up to its rear bumper without ramming (grapplerProfile), where the net hooks the rear wheel once the two close slower than 15 km/h, and the car is dragged to a stop: the officers then pull its driver out as at any car standing still. Its escapes are the simulation's: the cruiser's driver shot, a hard pull in reverse, a car over three tonnes. - The GPS dart: as many cruisers as the stars ask for (
darts) carry a launcher of FITTINGS.dartsdarts; their crews tail at a distance (dartProfile) and, from FITTINGS.dartMinto 25 m behind the player's car with it square ahead and in sight, fire one (@foi/sim'sfireTagDart): it sticks and tags the car. - A tagged car (a player at the wheel of a car carrying a GPS tag,
isPersonTracked): the radio says so; every unit after the player falls back to FITTINGS.tailDistanceand stops ramming (tailProfile); the tag is a sighting every FITTINGS.tagTicks(two seconds, the radio,police.ts), so the Heat does not cool and no star is lost; the HUD says TRACKED with a beep (police-tells.ts). Escapes: another car, or the tag pulled off at the car's rear (three seconds, the key held).
Deterministic: players in client order, units in the order they were sent.