Skip to content

Game.Vehicles.WorkVehicleFlags

Assembly: (unknown — not provided in source)
Namespace: Game.Vehicles

Type: public enum (with [Flags] attribute)

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

Summary:
WorkVehicleFlags is a bitmask enum used to mark special states/roles for work-related vehicles (e.g., service or industrial vehicles) in Cities: Skylines 2. The [Flags] attribute allows combining values with bitwise operations so a vehicle can represent multiple roles or transient states simultaneously (for example, a vehicle that is both returning and designated as a storage vehicle). The enum uses a 32-bit unsigned integer as its underlying type.


Fields

  • Returning
    Marks a vehicle that is returning (e.g., to depot or to a previously occupied location).

  • ExtractorVehicle
    Indicates the vehicle is an extractor-type vehicle (used for resource extraction tasks).

  • StorageVehicle
    Indicates the vehicle is associated with storage operations (moving goods to/from storage).

  • RouteSource
    Marks the vehicle as a source on a route (origin point for route-based goods/work).

  • Arriving
    Marks a vehicle that is currently arriving at a destination.

  • WorkLocation
    Indicates the vehicle represents (or is associated with) a work location.

  • CargoMoveVehicle
    Indicates the vehicle is used for cargo moving tasks (moving cargo between locations).

Properties

  • This enum defines flag values only. There are no instance properties associated with enum members.

Constructors

  • Enums do not have explicit constructors in source code. Each enum value is a compile-time constant of the declared underlying type (System.UInt32). The default value (0) is not declared in this enum.

Methods

  • No methods are declared on this enum type. Use standard enum operations (bitwise OR, AND, HasFlag, etc.) when manipulating values.

Usage Example

// Example usage demonstrating setting and checking flags

WorkVehicleFlags flags = WorkVehicleFlags.StorageVehicle | WorkVehicleFlags.Returning;

// Check if the vehicle is returning
bool isReturning = (flags & WorkVehicleFlags.Returning) != 0;
// or
bool isReturning2 = flags.HasFlag(WorkVehicleFlags.Returning);

// Add another flag
flags |= WorkVehicleFlags.Arriving;

// Remove a flag
flags &= ~WorkVehicleFlags.Returning;