Game.Pathfind.SetupTargetType
Assembly: Assembly-CSharp.dll
Namespace: Game.Pathfind
Type: enum
Base: System.Enum
Summary:
Enum that defines the various target types used by the pathfinding/setup system. Each value indicates the purpose or destination category for a pathfinding request (for example, whether an AI is heading to a workplace, a service vehicle responding to an emergency, a delivery/mail task, a tourist objective, or various request types). This enum is used by AI, vehicle and pedestrian logic, and path/request dispatchers to determine how to build routes and handle special-case behaviors.
Fields
-
None = -1
Used to indicate no target or an invalid/uninitialized target type. -
CurrentLocation
Target is the entity's current location (often no path needed). -
ResourceSeller
Target is a resource buyer/seller node (for resource deliveries). -
RouteWaypoints
Target is a sequence of waypoints (used for predefined route navigation). -
TransportVehicle
Target is a transport vehicle (e.g., to board or follow). -
GarbageCollector
Target is a garbage collection point or collection task. -
RandomTraffic
Target is a random traffic destination used for generic traffic simulation. -
JobSeekerTo
Target is a workplace/job location for a job-seeking citizen. -
SchoolSeekerTo
Target is a school location for school-bound citizens. -
FireEngine
Target is a fire engine (used by fire-related AI or routing). -
PolicePatrol
Target is a police patrol route/vehicle. -
Leisure
Target is a leisure/recreation destination. -
Taxi
Target is a taxi vehicle or taxi-related destination. -
ResourceExport
Target is an export point for resources (e.g., docks, outside connections). -
Ambulance
Target is an ambulance vehicle or ambulance-related destination. -
StorageTransfer
Target is a storage transfer point (for moving goods between storages). -
Maintenance
Target is a maintenance task/location. -
PostVan
Target is a postal van or postal service destination. -
MailTransfer
Target is a mail transfer location. -
MailBox
Target is a mailbox location. -
OutsideConnection
Target is an outside-city connection (imports/exports, highways). -
AccidentLocation
Target is the location of an accident (for emergency responders). -
Hospital
Target is a hospital/healthcare facility. -
Safety
Target is a safety-related location (generic safe spot). -
EmergencyShelter
Target is an emergency shelter location. -
EvacuationTransport
Target is an evacuation transport vehicle or node. -
Hearse
Target is a hearse or funeral service destination. -
CrimeProducer
Target is a crime source location (for police/AI awareness). -
PrisonerTransport
Target is a prisoner transport vehicle or location. -
WoodResource
Target is a wood resource source/processing location. -
AreaLocation
Target is a generic area/location (used for area-based tasks). -
Sightseeing
Target is a sightseeing/tourist point of interest. -
Attraction
Target is an attraction (theme park, landmark, etc.). -
GarbageTransfer
Target is a garbage transfer station/point. -
HomelessShelter
Target is a homeless shelter location. -
FindHome
Target indicates an actor is looking for a home/residence. -
TransportVehicleRequest
Request to find a transport vehicle (e.g., for pickups). -
TaxiRequest
Request to summon/find a taxi. -
PrisonerTransportRequest
Request related to prisoner transport services. -
EvacuationRequest
Request to initiate evacuation transport. -
GarbageCollectorRequest
Request for garbage collection services. -
PoliceRequest
Request for police response. -
FireRescueRequest
Request for fire/rescue response. -
PostVanRequest
Request for postal van service. -
MaintenanceRequest
Request for maintenance service. -
HealthcareRequest
Request for healthcare/ambulance service. -
TouristFindTarget
Target used by tourists to find attractions/points of interest.
Properties
- This enum type does not define properties.
Constructors
- Enums do not have explicit constructors in C#. Values are declared above.
Methods
- This enum does not define methods. Typical operations are casts to/from int or switch statements based on the enum value.
Usage Example
public void SetupPathForEntity(Entity entity, SetupTargetType targetType, int targetId)
{
switch (targetType)
{
case SetupTargetType.JobSeekerTo:
// build path to workplace (targetId = building id of workplace)
BuildPathToWork(entity, targetId);
break;
case SetupTargetType.Ambulance:
// send ambulance or route to hospital
DispatchAmbulance(entity, targetId);
break;
case SetupTargetType.TaxiRequest:
// create a taxi request at entity position
RequestTaxi(entity.Position);
break;
default:
// handle other target types or fallback
HandleGenericTarget(entity, targetType, targetId);
break;
}
}
Additional notes:
- Many values represent both direct navigation targets and service/request types; code consuming this enum should distinguish between immediate destinations and queued/requested services.
- Numeric values are the enum indices; None
explicitly uses -1 to indicate an invalid/unset target.