Skip to main content

Module activities

Module activities 

Source
Expand description

What each activity of the citizens’ AI does. See docs/CITIZEN-AI.md. Only the parts of the town that the activities ask about are modelled here, in TownView.

Original: the activities run by FUN_1401146c0.

Structs§

EntityView
What activities need to know about one entity.
Loiter
A loiter: walk to target, idle for duration seconds, then notify happiness (when set).
StorageGeometry
The geometry called by the town’s storage search. Uses the same sector cache as the AI.
TownSearch
The workplace searches’ view of the town (crate::work::professions::Search).
TownView
The map and entities activities read.

Functions§

loiter
Activity 12: choose a spot near something to stand at. cell is the citizen’s cell, home its home, range the citizen description’s range. ground(cell) returns a cell’s centre on the ground; rank(a, b) is the path-rank distance.

Type Aliases§

MapRect
MapComponent: an entity’s map rectangle (x, y, w, h).