Skip to content

Game.Citizens.Purpose

Assembly: Assembly-CSharp
Namespace: Game.Citizens

Type: enum

Base: System.Enum (underlying type: System.Byte)

Summary: Purpose is an enumeration used by the citizen/AI systems to represent the reason or goal behind a citizen's current behavior or state (for example: going to work, shopping, being in hospital, etc.). Each value signals a distinct activity, destination type, or status that the Citizen AI and other systems use to make routing, animation, and service decisions.


Fields

  • None
    Indicates no specific purpose assigned (default/idle state).

  • Shopping
    Citizen's goal is to shop at a commercial building.

  • Leisure
    Purpose is leisure-related (e.g., visiting parks, recreation).

  • GoingHome
    Citizen is travelling toward their residence.

  • GoingToWork
    Citizen is en route to their workplace.

  • Working
    Citizen is currently at work / performing work activity.

  • Sleeping
    Citizen is sleeping (typically at home or residence facility).

  • Exporting
    Purpose related to exporting goods (logistics/transport tasks).

  • MovingAway
    Citizen is moving out of the city / relocating.

  • Studying
    Citizen is studying (general learning/education activity).

  • GoingToSchool
    Citizen is en route to a school building.

  • StorageTransfer
    Purpose involves transferring items to/from storage (warehouse/logistics).

  • Hospital
    Citizen's goal involves a hospital (going to or interacting with hospital).

  • Delivery
    Citizen is delivering goods or mail.

  • UpkeepDelivery
    Delivery related to maintenance/upkeep supplies.

  • Safety
    Purpose related to safety behavior (seeking safe area, etc.).

  • EmergencyShelter
    Heading to an emergency shelter (disaster/shelter behavior).

  • Crime
    Citizen is engaged in criminal activity or the AI marks crime-related behavior.

  • GoingToJail
    Citizen is being escorted or heading to jail.

  • GoingToPrison
    Citizen is being sent to prison (longer-term incarceration).

  • InJail
    Citizen is currently in jail.

  • InPrison
    Citizen is currently in prison.

  • Collect
    Purpose to collect items/resources (e.g., collection job).

  • Escape
    Citizen is attempting to escape (from an incident/containment).

  • InHospital
    Citizen is currently in a hospital.

  • Deathcare
    Purpose related to deathcare services (funeral, mortuary tasks).

  • InDeathcare
    Citizen is currently being processed by deathcare services.

  • ReturnUnsortedMail
    Task to return unsorted mail (postal system behavior).

  • ReturnLocalMail
    Returning local mail to post office/route.

  • ReturnOutgoingMail
    Returning outgoing mail to a collection point.

  • Traveling
    General travel purpose (e.g., transit, visiting other districts).

  • Relaxing
    Purpose is to relax (restful non-work leisure).

  • Sightseeing
    Visiting city landmarks / tourist sightseeing.

  • VisitAttractions
    Visiting attraction buildings (museums, theme parks, etc.).

  • ReturnGarbage
    Returning garbage / waste collection related.

  • SendMail
    Sending mail / postal delivery actions.

  • Disappear
    Citizen is being removed from simulation (despawned).

  • WaitingHome
    Waiting at home (for service, event, schedule).

  • PathFailed
    Indicates a pathfinding failure for the current trip/purpose.

  • InEmergencyShelter
    Citizen is inside an emergency shelter.

  • CompanyShopping
    Shopping on behalf of a company or company-related procurement.

  • Count
    Sentinel value representing number of entries in the enum; useful for bounds checking and iteration.

Properties

  • (none)
    This enum does not define properties. It is a simple value type used by other classes.

Constructors

  • (none)
    Enums do not have explicit constructors. The default value (0) corresponds to Purpose.None.

Methods

  • (none declared)
    Standard Enum methods (ToString, etc.) are available from System.Enum, but there are no custom methods defined on this enum.

Usage Example

// Simple usage: store and check a citizen's purpose
Purpose p = Purpose.GoingToWork;

if (p == Purpose.GoingToWork) {
    // route citizen to workplace, play travel animation, etc.
}

// Casting from a byte value (e.g., saved data or network payload)
byte raw = GetPurposeFromSave(); // hypothetical
if (raw < (byte)Purpose.Count) {
    Purpose loaded = (Purpose)raw;
    // use loaded purpose safely
} else {
    Purpose loaded = Purpose.None; // fallback for invalid values
}