Skip to content

Game.Prefabs.LifePathEventType

Assembly: Assembly-CSharp
Namespace: Game.Prefabs

Type: enum

Base: System.Enum

Summary:
Enumerates the different life‑path events tracked by the game for citizens and tourists. These events are produced by the life simulation and can be used by mods to react to major changes in a citizen's life (education, employment, family events, health, crime, movement, etc.). Each enum value represents a discrete event type that can be reported by the life system.


Fields

  • CitizenStartedWorking
    Event fired when a citizen begins employment (starts working).

  • CitizenStartedSchool
    Event fired when a citizen starts attending school.

  • CitizenFailedSchool
    Event fired when a citizen fails school or an educational milestone.

  • CitizenGraduated
    Event fired when a citizen completes a school/education milestone (graduates).

  • CitizenBecameUnemployed
    Event fired when a citizen loses their job / becomes unemployed.

  • CitizenDied
    Event fired when a citizen dies.

  • CitizenGotSick
    Event fired when a citizen becomes sick / ill.

  • CitizenGotInjured
    Event fired when a citizen gets injured.

  • CitizenGotTrapped
    Event fired when a citizen is trapped (for example by debris, disaster, or blocked path).

  • CitizenGotInDanger
    Event fired when a citizen is in danger (general hazard/unsafe condition).

  • CitizenPartneredUp
    Event fired when a citizen forms a partnership (couple/relationship).

  • CitizenDivorced
    Event fired when a citizen gets divorced / the partnership ends.

  • CitizenMovedHouse
    Event fired when a citizen moves house within the city.

  • CitizenMovedOutOfCity
    Event fired when a citizen moves out of the city entirely.

  • CitizenSingleMadeBaby
    Event fired when a single citizen becomes a parent (has a baby as a single parent).

  • CitizensFamilyMemberDied
    Event fired when a family member of the citizen dies.

  • TouristLeftCity
    Event fired when a tourist leaves the city.

  • CitizenCommittedCrime
    Event fired when a citizen commits a crime.

  • CitizenGotArrested
    Event fired when a citizen is arrested.

  • CitizenGotSentencedToPrison
    Event fired when a citizen is sentenced to prison.

  • CitizenCoupleMadeBaby
    Event fired when a couple has a baby.

Properties

  • None. This is a simple enum type; there are no properties.

Constructors

  • None. Enum types do not define explicit constructors beyond the default System.Enum behavior.

Methods

  • None defined on the enum itself. Use standard Enum methods (ToString, Parse, etc.) if needed.

Usage Example

using Game.Prefabs;

public void OnLifePathEvent(LifePathEventType eventType, ulong citizenId)
{
    switch (eventType)
    {
        case LifePathEventType.CitizenStartedWorking:
            Debug.Log($"Citizen {citizenId} started working.");
            break;
        case LifePathEventType.CitizenDied:
            Debug.Log($"Citizen {citizenId} died.");
            // react: update UI, spawn funeral service request, etc.
            break;
        case LifePathEventType.CitizenMovedOutOfCity:
            Debug.Log($"Citizen {citizenId} moved out of the city.");
            break;
        case LifePathEventType.CitizenCoupleMadeBaby:
        case LifePathEventType.CitizenSingleMadeBaby:
            Debug.Log($"Citizen {citizenId} welcomed a baby.");
            break;
        default:
            Debug.Log($"Citizen {citizenId} life event: {eventType}");
            break;
    }
}

// Parsing from integer value (if you receive a raw int):
int raw = 3;
if (Enum.IsDefined(typeof(LifePathEventType), raw))
{
    LifePathEventType ev = (LifePathEventType)raw;
    OnLifePathEvent(ev, 12345ul);
}

Notes for modders: - This enum represents event types emitted by the life simulation. Mods can listen for corresponding game events/messages that carry these enum values to react to citizen life changes. - Do not rely on the numeric underlying values remaining stable across game updates; prefer comparing enum names or using the enum symbol itself when possible.