Game.Vehicles.PersonalCarFlags
Assembly: Assembly-CSharp
Namespace: Game.Vehicles
Type: enum (with [Flags], public)
Base: System.Enum (underlying type: System.UInt32)
Summary:
Flags describing transient states for personal/AI-driven cars (bitmask values). These flags are used to represent behaviors such as whether the car is carrying passengers, in the process of boarding or disembarking, a dummy traffic vehicle, or targeted to a home. Because the enum is marked with [Flags], multiple states can be combined using bitwise operations.
Fields
-
Transporting = 1u
Indicates the car is transporting a passenger (actively carrying someone). -
Boarding = 2u
Indicates the car is in the boarding state (passenger(s) are getting on). -
Disembarking = 4u
Indicates the car is in the disembarking state (passenger(s) are getting off). -
DummyTraffic = 8u
Marks the vehicle as dummy traffic (non-player meaningful traffic, used for simulation/visuals). -
HomeTarget = 0x10u
Indicates the car has a home as its target (returning to or targeting a residence).
Properties
- (None)
This enum type does not expose any properties.
Constructors
- (None)
Enums do not define constructors. Instances are values of the enum type.
Methods
- (None)
No methods are defined on this enum. Use standard enum and bitwise operations to inspect or modify values.
Usage Example
// Creating a combined flag (car is transporting and flagged as home target)
PersonalCarFlags flags = PersonalCarFlags.Transporting | PersonalCarFlags.HomeTarget;
// Check if the car is transporting
bool isTransporting = (flags & PersonalCarFlags.Transporting) != 0;
// Add a flag (set Boarding)
flags |= PersonalCarFlags.Boarding;
// Remove a flag (clear Transporting)
flags &= ~PersonalCarFlags.Transporting;
// Check multiple flags
bool isBoardingOrDisembarking = (flags & (PersonalCarFlags.Boarding | PersonalCarFlags.Disembarking)) != 0;
{{ This enum is intended for use in vehicle state logic within the game's simulation. When reading or writing these flags in mods, ensure thread-safety and follow the game's expected update patterns (e.g., perform changes within appropriate simulation/vehicle update callbacks). }}