Skip to content

Game.Prefabs.BuildingType

Assembly: Assembly-CSharp
Namespace: Game.Prefabs

Type: public enum

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

Summary:
Represents the classification of building prefabs used by the game to determine service logic, zoning, AI, rendering rules and other behavior. Values are used throughout the simulation and UI to decide how a building is treated (for example, whether it provides a service, is a residential/industrial/commercial building, or a special-purpose facility). The enum defines a special None value (-1) and a set of named types that auto-increment from 0. Use these values when checking or assigning building categories in mods, prefab overrides, or when filtering building lists.


Fields

  • None = -1
    Represents an undefined or no type. Useful as a default/uninitialized value.

  • Hospital
    Healthcare service building.

  • PowerPlant
    Power production building (large generation sites).

  • Transformer
    Power distribution transformer/secondary facility.

  • FreshWaterBuilding
    Fresh water supply facility.

  • SewageBuilding
    Sewage treatment facility.

  • StormWaterBuilding
    Stormwater management facility.

  • TransportDepot
    Transport vehicle depot/garage.

  • TransportStation
    Public transport station (bus/tram/train/metro stops).

  • GarbageFacility
    Waste processing/transfer/recycling facility.

  • FireStation
    Firefighting service building.

  • PoliceStation
    Police/law enforcement building.

  • RoadMaintenanceDepot
    Road maintenance and repair depot.

  • PostFacility
    Postal service building.

  • TelecomFacility
    Telecommunications facility.

  • School
    Educational building (primary/secondary).

  • EmergencyShelter
    Shelter for emergencies/disasters.

  • DisasterFacility
    Dedicated disaster response facility.

  • FirewatchTower
    Firewatch tower / lookout.

  • Park
    Park/green space building type.

  • DeathcareFacility
    Cemeteries, crematoriums and other deathcare services.

  • Prison
    Correctional facility.

  • AdminBuilding
    City administrative buildings (city hall, etc).

  • WelfareOffice
    Welfare / social services facility.

  • ResearchFacility
    Research and development buildings.

  • ParkMaintenanceDepot
    Depot for park maintenance vehicles.

  • ParkingFacility
    Car parks / parking garages.

  • Battery
    Battery storage facility (energy storage).

  • ResidentialBuilding
    Standard residential building.

  • CommercialBuilding
    Standard commercial building.

  • IndustrialBuilding
    Standard industrial building.

  • OfficeBuilding
    Standard office building.

  • SignatureResidential
    Special "signature" (unique) residential building.

  • ExtractorBuilding
    Resource extractor (quarry, mine, etc).

  • SignatureCommercial
    Special "signature" commercial building.

  • SignatureIndustrial
    Special "signature" industrial building.

  • SignatureOffice
    Special "signature" office building.

  • LandValueSources
    Type used for sources that affect land value (may be treated specially in land-value calculations or UI).

Properties

  • (None)
    This enum type has no properties. Use its named values directly.

Constructors

  • (None)
    Enums do not expose constructors; values are created by assignment or casting from the underlying integer type.

Methods

  • (None)
    No instance methods are defined on this enum beyond the standard System.Enum methods (ToString, HasFlag, etc.).

Usage Example

// Example: checking a prefab's building type
BuildingType type = myPrefab.buildingType; // hypothetical property

switch (type)
{
    case BuildingType.Hospital:
        // apply hospital-specific logic
        break;
    case BuildingType.ResidentialBuilding:
    case BuildingType.SignatureResidential:
        // handle residential buildings
        break;
    case BuildingType.None:
        // fallback / ignore
        break;
    default:
        // default handling for other types
        break;
}

// Casting from int (e.g., when reading saved data)
int raw = GetIntFromSomewhere();
BuildingType parsed = (BuildingType)raw;

// Safely test if parsed value is defined
bool isDefined = System.Enum.IsDefined(typeof(BuildingType), parsed);

Additional notes for modders: - This enum is commonly referenced by prefab/BuildingInfo data and AI/service systems. Check the game's API or existing mods to find the exact property name on prefab classes (the example above uses a hypothetical myPrefab.buildingType). - When adding behavior based on building type, prefer using explicit checks (switch/case) to avoid misclassifying signature vs. standard types. - Because the enum underlying type is int, values can be serialized/deserialized as integers when storing custom data. Validate values with Enum.IsDefined before casting if data may come from external sources.