Skip to content

Game.UI.InGame.CitizenStateKey

Assembly: Assembly-CSharp
Namespace: Game.UI.InGame

Type: enum

Base: System.Enum

Summary:
Represents the set of named states a citizen can be in from the perspective of the in-game UI. These keys are used by UI code to choose icons, labels and tooltips (and sometimes animations) that describe what a citizen is currently doing. Useful for modders who want to read, display or react to a citizen's activity in custom UI elements or logic. Note: actual assembly/name may vary between game versions and mod builds (commonly Assembly-CSharp).


Fields

  • Shopping
    Represents a citizen who is shopping at a commercial building.

  • FreeTime
    The citizen is spending leisure time (e.g., visiting parks, cafes).

  • Sightseeing
    The citizen is visiting tourist attractions or sightseeing.

  • GoingHome
    Heading to their residence.

  • GoingBackToHotel
    Returning to a hotel (tourist/temporary resident).

  • GoingToWork
    En route to their workplace.

  • Working
    Currently at work / performing job duties.

  • Sleeping
    Sleeping at home or lodging.

  • Traveling
    In transit (generic travel state, e.g., using transport services).

  • MovingAway
    Relocating out of the city.

  • Studying
    Engaged in study (e.g., university, research).

  • GoingToSchool
    Heading to a school (for students/children).

  • SeekingMedicalHelp
    Trying to get medical attention.

  • InHospital
    Currently admitted to a hospital.

  • GettingToSafety
    Moving to a safe location (e.g., during a disaster).

  • Evacuating
    Actively evacuating the area/city.

  • CommittingCrime
    Performing a criminal activity.

  • GoingToJail
    Being transported to jail.

  • GoingToPrison
    Being transported to prison.

  • InJail
    Detained in jail.

  • InPrison
    Incarcerated in prison.

  • Escaping
    Attempting to escape custody / confinement.

  • Idling
    Not doing any particular activity (idle state).

  • Dead
    Deceased.

  • MovingIn
    In the process of moving into the city.

  • LeavingCity
    Leaving the city (traveling away).

  • InvolvedInAccident
    Currently in or affected by an accident.

  • Safe
    In a safe condition/location.

  • InEmergencyShelter
    Located in an emergency shelter.

  • SendMail
    Performing a mail-related action (sending mail).

Properties

  • This enum does not expose custom properties. It behaves as a standard System.Enum (you can use Enum methods like ToString, Parse, HasFlag, etc.).

Constructors

  • Enums use the default value/type constructor provided by .NET (underlying type is int). There are no custom constructors to document.

Methods

  • No custom methods are defined on the enum itself. Standard System.Enum/static helper operations apply (e.g., Enum.GetValues, Enum.Parse, ToString).

Usage Example

// Example: mapping a CitizenStateKey to a UI label and icon
public void UpdateCitizenIcon(CitizenStateKey state, out string label, out Sprite icon)
{
    switch (state)
    {
        case CitizenStateKey.Shopping:
            label = "Shopping";
            icon = shoppingIcon;
            break;
        case CitizenStateKey.GoingToWork:
        case CitizenStateKey.Working:
            label = "At Work";
            icon = workIcon;
            break;
        case CitizenStateKey.SeekingMedicalHelp:
        case CitizenStateKey.InHospital:
            label = "Medical";
            icon = medicalIcon;
            break;
        case CitizenStateKey.Evacuating:
        case CitizenStateKey.GettingToSafety:
            label = "Evacuating";
            icon = evacuationIcon;
            break;
        case CitizenStateKey.Dead:
            label = "Deceased";
            icon = deadIcon;
            break;
        default:
            label = state.ToString(); // fallback: use the enum name
            icon = defaultIcon;
            break;
    }
}

Additional tips for modders: - The UI often uses localized strings for display; map these enum values to localization keys rather than hard-coding English text. - These keys are typically produced by AI/citizen simulation systems — if you want to change behavior, patch or observe the simulation components that emit these states. - When creating custom UI, treat the set as extensible only in your mod's code — game code expects the defined enum values.