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

Detailed Description

calculates the best path for depositing an item(eg items produced in production)

Inheritance diagram for CityBuilderCore.IReceiverPathfinder:
CityBuilderCore.DefaultItemManager

Public Member Functions

BuildingComponentPath< IItemReceiverGetReceiverPath (IBuilding building, Vector2Int? currentPoint, ItemQuantity items, float maxDistance, PathType pathType, object pathTag=null, int currentPriority=0)
 attempts to find a receiver and a path to it for an item a walker wants to deliver
 
BuildingComponentPathQuery< IItemReceiverGetReceiverPathQuery (IBuilding building, Vector2Int? currentPoint, ItemQuantity items, float maxDistance, PathType pathType, object pathTag=null, int currentPriority=0)
 

Member Function Documentation

◆ GetReceiverPath()

BuildingComponentPath< IItemReceiver > CityBuilderCore.IReceiverPathfinder.GetReceiverPath ( IBuilding building,
Vector2Int? currentPoint,
ItemQuantity items,
float maxDistance,
PathType pathType,
object pathTag = null,
int currentPriority = 0 )

attempts to find a receiver and a path to it for an item a walker wants to deliver

Parameters
buildinghome building of the walker
currentPointcurrent point of the walker(if not home)
itemsitems the walker is trying to get rid of
maxDistancemaximum distance a receiver can be from the walker
pathTypepathing type to use for the walking path
pathTagadditional pathing paramater
currentPriorityIItemReceiver.Priority of the building the walker is coming from, used to make sure an item is not delivered from one storage to another for example
Returns
a reference and path to a receiver if one was found

Implemented in CityBuilderCore.DefaultItemManager.