Loading...
Searching...
No Matches
CityBuilderCore.IWorkplaceFinder Interface Reference

Detailed Description

finds the optimal workplace for any given worker and provide it with a path to work and supply if necessary

Inheritance diagram for CityBuilderCore.IWorkplaceFinder:
CityBuilderCore.DefaultPopulationManager

Public Member Functions

WorkerPath GetWorkerPath (IBuilding building, Vector2Int? currentPoint, Worker worker, ItemStorage storage, float maxDistance, PathType pathType, object pathTag)
 attempts to find a worker path for a worker
 
WorkerPathQuery GetWorkerPathQuery (IBuilding building, Vector2Int? currentPoint, Worker worker, ItemStorage storage, float maxDistance, PathType pathType, object pathTag)
 attempts to find a worker path for a worker
 

Member Function Documentation

◆ GetWorkerPath()

WorkerPath CityBuilderCore.IWorkplaceFinder.GetWorkerPath ( IBuilding building,
Vector2Int? currentPoint,
Worker worker,
ItemStorage storage,
float maxDistance,
PathType pathType,
object pathTag )

attempts to find a worker path for a worker

Parameters
buildingthe structure the worker hails from
currentPointthe current position of the worker
workerthe type of worker(mason, carpenter, ...)
storagethe storage the worker has available to carry supply to its workplace
maxDistancemaximum distance to workplace
pathTypethe type of pathing the worker uses to get around
pathTagadditional parameter for pathfinding
Returns
if found, a workplace and a path to get there(possibly a path to some items the worker needs to pick up beforehand)

Implemented in CityBuilderCore.DefaultPopulationManager.

◆ GetWorkerPathQuery()

WorkerPathQuery CityBuilderCore.IWorkplaceFinder.GetWorkerPathQuery ( IBuilding building,
Vector2Int? currentPoint,
Worker worker,
ItemStorage storage,
float maxDistance,
PathType pathType,
object pathTag )

attempts to find a worker path for a worker

Parameters
buildingthe structure the worker hails from
currentPointthe current position of the worker
workerthe type of worker(mason, carpenter, ...)
storagethe storage the worker has available to carry supply to its workplace
maxDistancemaximum distance to workplace
pathTypethe type of pathing the worker uses to get around
pathTagadditional parameter for pathfinding
Returns
a query that on completion may return, if found, a workplace and a path to get there(possibly a path to some items the worker needs to pick up beforehand)

Implemented in CityBuilderCore.DefaultPopulationManager.