Skip to content

five-on-it / packages/ai/src/police-tow

packages/ai/src/police-tow ​

The tow-truck sweep (C12, GAME_DESIGN §12, six stars and up): the city takes away the cars a wanted player left parked. The police note every car a player gets out of (or swaps for another), for TOW.memoryTicks; while that player has six stars or more and is TOW.away from it (they walked away from it), a tow truck (@foi/sim's TOW_TRUCK, its amber light bar the tell) is sent to each of those cars, one at a time, from the roads out of the player's sight. Once beside the car it hooks it up for TOW.hookTicks and takes it to the pound: the car is gone, the radio and the news say so, and the truck drives off. (The cars a player stored in a garage are not in the street to tow: the sweep leaves them be.)

The counters: get to the car first (a player in it, or beside it, calls the job off), or stop the driver (down or dead, the truck goes nowhere). The truck's driver is a plain NPC on the police's side, blind and harmless (it tows, it does not chase), steered by the AI's ordinary means. Deterministic: the jobs in the order they were made.

Interfaces ​

Variables ​

Functions ​