Game.Areas.DistrictOption
Assembly: Assembly-CSharp
Namespace: Game.Areas
Type: Enum
Base: System.Enum
Summary: An enumeration of configurable district-level options in Cities: Skylines 2. Each value represents a specific rule or restriction that can be applied to a district (for example, forbidding certain vehicle types or enabling paid parking). These options are typically used by district-management systems or APIs that enable/disable behaviors for all buildings and vehicles inside a district.
Fields
-
PaidParking
Enables paid on-street parking in the district. When applied, parking behavior and related economics for vehicles in the district are affected (vehicles may seek paid parking spaces, and parking revenues may apply). -
ForbidCombustionEngines
Prohibits vehicles with combustion engines (e.g., petrol/diesel cars) from entering or using roads inside the district. Intended to enforce low-emission or EV-only areas. -
ForbidTransitTraffic
Prevents transit traffic (such as buses/trams or other public/route-based vehicles) from traversing or operating within the district boundaries. Use this to restrict public transit routes from entering the district. -
ForbidHeavyTraffic
Blocks heavy goods/industrial vehicles (heavy trucks) from using roads inside the district. Useful for preserving local road quality and reducing noise/traffic impact.
Properties
- None.
This enum exposes only the named values; there are no additional properties defined on the type.
Constructors
- Default enum constructor (compiler generated)
As with all enums, a default value-to-instance mapping and underlying integer constructor are provided by the runtime. The defined members map to integer values starting at 0 in declaration order: - PaidParking = 0
- ForbidCombustionEngines = 1
- ForbidTransitTraffic = 2
- ForbidHeavyTraffic = 3
Methods
- None specific to this enum.
Standard System.Enum methods (ToString, GetValues, Parse, etc.) are available.
Usage Example
// Check a district option value
DistrictOption option = DistrictOption.PaidParking;
if (option == DistrictOption.PaidParking)
{
// Apply paid-parking logic for the district
}
// Iterate all available district options
foreach (DistrictOption opt in Enum.GetValues(typeof(DistrictOption)))
{
Console.WriteLine($"{(int)opt} = {opt}");
}
// Get underlying integer value
int raw = (int)DistrictOption.ForbidHeavyTraffic; // raw == 3