Game.Vehicles.DeliveryTruckFlags
Assembly:
Assembly-CSharp
Namespace:
Game.Vehicles
Type:
public enum DeliveryTruckFlags : uint
Base:
System.Enum (backed by System.UInt32)
Summary:
Flags enum that represents the state and behavior markers for delivery truck vehicles in the game's vehicle simulation. Each named value is a single bit (or bit mask) and can be combined using bitwise operations. Commonly used by vehicle AI and simulation code to check or modify delivery truck behaviour such as loading state, whether it's returning, performing storage transfers, or ignoring unloading.
Fields
-
Returning = 1u
Flag indicating the truck is returning (e.g., to base or depot). -
Loaded = 2u
Indicates the truck currently carries cargo (is loaded). -
DummyTraffic = 4u
Marks the truck as dummy traffic — typically used for non-functional or placeholder vehicles that should not affect gameplay logic the same way real delivery trucks do. -
Buying = 0x10u
The truck is currently in a buying state (picking up goods to transport). -
StorageTransfer = 0x20u
Indicates the truck is transferring goods to/from storage (internal storage operations). -
Delivering = 0x40u
The truck is performing a delivery (en route to deliver cargo). -
NoUnloading = 0x80u
Prevents unloading of cargo (used to temporarily inhibit unloading behavior). -
TransactionCancelled = 0x100u
Marks that the current transaction (purchase/delivery) was cancelled. -
UpdateOwnerQuantity = 0x200u
Indicates that the owner's quantity (inventory/accounting) needs to be updated. -
UpdateSellerQuantity = 0x400u
Indicates that the seller's quantity needs to be updated.
Properties
- This enum type has no properties.
Enums expose their values as constants; any runtime state is held where the enum is used (for example, a Vehicle or VehicleData structure containing a DeliveryTruckFlags field).
Constructors
- This enum has no constructors.
As a value type enum, instances are created by assigning one of the defined values or combinations thereof.
Methods
- This enum declares no methods.
Standard System.Enum and System.ValueType methods apply (e.g., ToString, HasFlag), but there are no custom methods defined on the enum itself.
Usage Example
// Example usage of DeliveryTruckFlags
DeliveryTruckFlags flags = 0;
// Set flags
flags |= DeliveryTruckFlags.Buying | DeliveryTruckFlags.Loaded;
// Check if truck is loaded
bool isLoaded = (flags & DeliveryTruckFlags.Loaded) != 0;
// Clear a flag (stop buying)
flags &= ~DeliveryTruckFlags.Buying;
// Toggle NoUnloading
flags ^= DeliveryTruckFlags.NoUnloading;
// Check multiple flags at once
bool deliveringAndLoaded = (flags & (DeliveryTruckFlags.Delivering | DeliveryTruckFlags.Loaded))
== (DeliveryTruckFlags.Delivering | DeliveryTruckFlags.Loaded);
Additional notes: - Because the enum is decorated with [Flags], values are intended to be combined and tested with bitwise operators. - Backing type is uint — when interfacing with code that expects different sizes, be careful with casts. - Typical usage is storing this enum in a vehicle state field and reading/updating it inside vehicle AI/update loops.