Skip to content

Game.Prefabs.VehicleType

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

Type: public enum

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

Summary:
Enumeration used to classify vehicle prefabs and runtime vehicle instances by their gameplay role. Values distinguish passenger and cargo transport, service and maintenance vehicles, emergency vehicles, and special-purpose transports. The enum includes a sentinel value None = -1 for uninitialized/unknown types.


Fields

  • None = -1
    Represents an unspecified or invalid vehicle type. Often used as a default or error value.

  • PassengerTransport = 0
    Passenger transport vehicles (e.g., personal passenger vehicles, buses, trams, or other vehicles whose primary role is moving people).

  • CargoTransport = 1
    Cargo/freight transport vehicles (e.g., trucks, freight trains, or any vehicle whose primary role is moving goods).

  • Taxi = 2
    Taxi vehicles used for paid passenger transport services.

  • ParkMaintenance = 3
    Vehicles used for park maintenance tasks (e.g., groundskeeping vehicles operating in park areas).

  • RoadMaintenance = 4
    Vehicles used for road maintenance and repair tasks (e.g., street sweepers, road repair crews).

  • Ambulance = 5
    Ambulance vehicles used for medical emergency response and patient transport.

  • EvacuatingTransport = 6
    Vehicles designated for evacuation purposes (e.g., mass-evacuation transports during disasters).

  • FireEngine = 7
    Firefighting vehicles used to respond to fires and related emergencies.

  • GarbageTruck = 8
    Garbage collection vehicles used by waste management services.

  • Hearse = 9
    Hearses used to transport deceased citizens.

  • PoliceCar = 10
    Police patrol and response vehicles for law enforcement duties.

  • PostVan = 11
    Postal delivery vehicles used by the postal service.

  • PrisonerTransport = 12
    Vehicles used to transport prisoners (e.g., from crime scenes to detention facilities).

Properties

  • This enum has no instance properties; it is a value type used directly as a classification.

Constructors

  • Enums do not expose constructors. Values are assigned by name or by casting integers to VehicleType.

Methods

  • No methods are defined on this enum beyond the standard System.Enum methods (ToString, Parse, HasFlag if applicable via flags, etc.).

Usage Example

// Assigning and checking a vehicle type
VehicleType vType = VehicleType.PassengerTransport;

if (vType == VehicleType.Ambulance)
{
    // Handle ambulance-specific logic
}

// Example: switch over vehicle types
switch (vType)
{
    case VehicleType.PassengerTransport:
        // passenger handling
        break;
    case VehicleType.CargoTransport:
        // cargo handling
        break;
    case VehicleType.None:
    default:
        // fallback / unknown
        break;
}

{{ Additional notes: - Use this enum when creating or filtering vehicle prefabs, spawning runtime vehicles, routing logic, or UI displays that depend on vehicle role. - If you extend vehicle roles in mods, ensure compatibility with existing game systems that expect these specific categories. }}