Skip to content

five-on-it / packages/ai/src/restricted

packages/ai/src/restricted ​

Restricted zones (GAME_DESIGN §5.3): circles of a game a player may not walk or drive into without consequences. Each says what it raises on a player's entry:

  • the alert: the compound's guards near it (the room's sentries within its radius and RESTRICTED's reach) turn suspicious at once, toward the player; the player still inside after RESTRICTED's alertSeconds, they are alerted, after the player.
  • the Heat: trespass is a crime (wanted.ts) the police count when it is seen: a pedestrian or an officer within a witness's range of the player as they enter.

The server hands the game's restricted zones over (setRestrictedZones); the zone's event for a mission (zone:<id>.trespass) is the mission interpreter's own, from the zone's kind. Who stands where is kept by client, part of the AI's hash.

Interfaces ​

Variables ​

Functions ​