Game.RandomTrafficRequestFlags
Assembly: Assembly-CSharp.dll
Namespace: Game.Simulation
Type: public enum RandomTrafficRequestFlags : byte
Base: System.Enum (underlying type: byte)
Summary:
Flags enum used by the simulation to describe options for random traffic spawn requests. The enum is marked with [Flags], so values are intended to be combined with bitwise operations to express multiple options (for example, "exclude slow vehicles" while requesting delivery trucks).
Fields
-
NoSlowVehicles = 1
Exclude slow-moving vehicles from the random traffic request (value 0x01). -
DeliveryTruck = 2
Indicates that the request should include delivery trucks (value 0x02). -
TransportVehicle = 4
Indicates that the request should include transport/Transit vehicles (value 0x04).
Properties
- None.
This enum only declares flag values; there are no associated properties.
Constructors
- None.
Enums have implicit construction behavior; there is no explicit constructor in this declaration.
Methods
- None.
There are no methods defined on this enum type. Use standard enum methods (e.g., HasFlag) and bitwise operators when working with these flags.
Usage Example
// Combine flags to request delivery trucks but exclude slow vehicles
RandomTrafficRequestFlags flags = RandomTrafficRequestFlags.DeliveryTruck | RandomTrafficRequestFlags.NoSlowVehicles;
// Test for a specific flag
bool wantsDeliveryTrucks = (flags & RandomTrafficRequestFlags.DeliveryTruck) != 0;
// or using HasFlag (less efficient)
bool hasTransport = flags.HasFlag(RandomTrafficRequestFlags.TransportVehicle);
Additional notes: - Because no zero/None value is declared, a default enum value of 0 does not correspond to any named flag; handle default/zero values explicitly if needed. - The underlying storage is a byte, so values are limited to the byte range and bitwise combinations should fit within 8 bits.