Skip to content

Game.Buildings.BuildingOption

Assembly: Assembly-CSharp.dll
Namespace: Game.Buildings

Type: public enum

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

Summary: An enumeration that represents selectable options or simple states associated with a building. Used by building-related systems to mark a building as having paid parking, being inactive, or representing an empty/no-option state.


Fields

  • PaidParking
    Used to indicate the building has paid parking behavior enabled or that the building should be treated as a paid-parking-type facility.

  • Inactive
    Indicates the building is inactive, closed, disabled, or otherwise not functioning (for example during shutdown, demolition preparation, or when temporarily disabled by gameplay logic).

  • Empty
    A default/none placeholder value that represents no special option set for the building.

Properties

  • (none)
    Enums do not declare properties; only the named constant values above are defined.

Constructors

  • (none - enum values are declared constants)
    No explicit constructors are defined for this enum. Enum values are compile-time constants backed by the underlying integral type (int).

Methods

  • (none declared)
    No instance methods are declared on this enum. Standard System.Enum methods are available (e.g., ToString(), HasFlag(), Parse/TryParse via Enum helpers).

Usage Example

// Example usage: checking or assigning a building option
public void ApplyBuildingOption(Building building, Game.Buildings.BuildingOption option)
{
    switch (option)
    {
        case Game.Buildings.BuildingOption.PaidParking:
            // enable paid parking behavior on the building
            building.EnablePaidParking(true);
            break;
        case Game.Buildings.BuildingOption.Inactive:
            // mark building inactive in game logic
            building.SetActive(false);
            break;
        case Game.Buildings.BuildingOption.Empty:
        default:
            // no special option; ensure defaults
            building.ResetOptionsToDefault();
            break;
    }
}

// Example: reading an option
var option = someBuilding.Option; // assume someBuilding.Option is of type BuildingOption
if (option == Game.Buildings.BuildingOption.PaidParking)
{
    // handle paid parking case
}

{{ This enum is a simple set of named constants intended for use by building-management code paths in the Cities: Skylines 2 game/mods. Adjust usage to match actual building API methods in your mod (the sample methods EnablePaidParking, SetActive, ResetOptionsToDefault are illustrative). }}