Skip to content

Game.City.CityOption

Assembly: Assembly-CSharp
Namespace: Game.City

Type: public enum

Base: System.Enum

Summary: Enumeration of simple city-level gameplay options exposed by the game. Each value represents a toggleable option that affects simulation or game rules related to traffic and service handling within a city. This enum is a compact representation (backed by an integer) used wherever city options are stored, serialized, or checked in game code or mods.


Fields

  • UnlimitedHighwaySpeed
    Controls whether highways in the city ignore or relax normal speed limits in the simulation. When selected, vehicles on highways may be allowed to travel at higher speeds than under regular speed limit rules (implementation depends on how the game applies this option).

  • PaidTaxiStart
    Toggles behavior for taxi services related to payment/activation. When enabled, taxi service startup or dispatch may be gated by a payment/fee rule (exact in-game mechanics are determined by the game systems that read this option).

  • ImportOutsideServices
    Specifies whether the city is allowed to import or use services from outside the city (for example, relying on outside dumps, hospitals, or other service providers). When enabled, the city may request and accept services from outside connections.

Properties

  • This enum type has no properties. It is a plain enum representing discrete option values.

Constructors

  • Enums do not define explicit constructors in C#. The underlying type is int and the first member (UnlimitedHighwaySpeed) has the value 0 by default. You can cast integers to this enum when reading stored settings.

Methods

  • This enum defines no methods. Use standard Enum methods (Enum.Parse, Enum.TryParse, Enum.GetValues, etc.) where needed.

Usage Example

// Example: checking and acting on a CityOption value.
CityOption option = CityOption.ImportOutsideServices;

switch (option)
{
    case CityOption.UnlimitedHighwaySpeed:
        // Apply logic to relax highway speed enforcement
        ApplyHighwaySpeedPolicy(relaxed: true);
        break;

    case CityOption.PaidTaxiStart:
        // Enable paid taxi startup behavior
        TaxiService.SetPaidStartEnabled(true);
        break;

    case CityOption.ImportOutsideServices:
        // Allow importing services from outside connections
        CityServiceManager.AllowOutsideServices = true;
        break;
}

// Parsing a saved integer value to the enum (e.g., from config or save data)
int saved = 2;
if (Enum.IsDefined(typeof(CityOption), saved))
{
    CityOption loaded = (CityOption)saved;
    // use loaded...
}