Game.Vehicles.VehicleWorkType
Assembly:
Assembly-CSharp
Namespace:
Game.Vehicles
Type:
public enum
Base:
System.Enum (underlying type: System.UInt32)
Summary:
Represents the kind of work a vehicle is assigned to perform. Values are simple discrete work categories used by vehicle AI / task scheduling to determine behavior (e.g., harvesting resources, collecting items, moving between locations). The enum's underlying storage is a 32-bit unsigned integer (uint).
Fields
-
None
Represents no assigned work. This is the default value (0) and indicates the vehicle currently has no specific work task. -
Harvest
Represents a harvesting task (value: 1). Used for vehicles that gather resources from the environment (e.g., farm/forest harvest vehicles). -
Collect
Represents a collection task (value: 2). Used for vehicles that pick up or collect items/packets (e.g., garbage trucks, collection vehicles). -
Move
Represents a movement/transport task (value: 3). Used for vehicles whose task is to move between locations, typically transporting goods or people.
Properties
- This enum type does not define properties.
Constructors
- Enums do not define explicit constructors. Instances are the named constant values listed above.
Methods
- Enums do not declare methods. Standard System.Enum methods (ToString, HasFlag, etc.) are available.
Usage Example
using Game.Vehicles;
public void AssignWorkToVehicle(Vehicle vehicle, VehicleWorkType work)
{
// Assign a work type
vehicle.WorkType = work;
// React based on work type
switch (work)
{
case VehicleWorkType.None:
// idle behavior
break;
case VehicleWorkType.Harvest:
// start harvesting logic
break;
case VehicleWorkType.Collect:
// collection logic
break;
case VehicleWorkType.Move:
// movement/transport logic
break;
}
}
// Example call:
AssignWorkToVehicle(myVehicle, VehicleWorkType.Harvest);