|
ClassicCityBuilderKit 1.9.4
|
default implementation of all people systems bundeld up into one for convenience
Classes | |
| class | EmploymentData |
| class | EmploymentGroupData |
| class | PopulationData |
Public Member Functions | |
| Migration | GetMigration (Population population) |
| IEnumerable< IHousing > | GetHousings () |
| int | GetQuantity (Population population, bool includeReserved=false) |
| calculates the total quantity of a population currently being housed in the city | |
| int | GetCapacity (Population population) |
| calculates the total quantity of a population that can be housed in the city | |
| int | GetRemainingCapacity (Population population) |
| calculated how many more of a population fits into the city | |
| void | AddHomeless (Population population, IHousing housing, int quantity) |
| spawns homeless walkers that carry the population quantity and try to find new housing used when housing downgrades and can no longer hold the quantity it did before | |
| void | AddEmployment (IEmployment employment) |
| registers an employment with the manager so that it can now be considered when distributing available employees typically called in Start | |
| void | RemoveEmployment (IEmployment employment) |
| removes an employment that was previously added to the manager, the employment will no longer have any employees assigned typically called in OnDestroy | |
| int | GetNeeded (Population population, EmploymentGroup group=null) |
| checks how many employees in a population are currently needed | |
| int | GetAvailable (Population population, EmploymentGroup group=null) |
| checks how many employees in a population are available for work | |
| int | GetEmployed (Population population, EmploymentGroup group=null) |
| checks how many employees in a population are currently employed | |
| float | GetEmploymentRate (Population population) |
| calculates employment rate for a population(needed/available) 100 jobs for 200 employees > 0.5 300 jobs for 100 employees > 3.0 | |
| float | GetWorkerRate (Population population) |
| calculates worker rate for population(available/needed) 100 jobs for 200 employees > 2.0 300 jobs for 150 employees > 0.5 | |
| void | CheckEmployment () |
| forces immediate redistribution of employees ususally the manager does this itself, this is called after loading so there is no wait time | |
| int | GetPriority (EmploymentGroup group) |
| checks the current priority of an employment group the priority determines in which order employees are assigned | |
| void | SetPriority (EmploymentGroup group, int priority) |
| changes the priority of an employment group this changes which employment groups employees are distributed to first | |
| 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 | |
Protected Member Functions | |
| virtual void | Awake () |
| virtual void | Start () |
|
inline |
registers an employment with the manager so that it can now be considered when distributing available employees
typically called in Start
| employment | the employment to add to the manager |
Implements CityBuilderCore.IEmploymentManager.
|
inline |
spawns homeless walkers that carry the population quantity and try to find new housing
used when housing downgrades and can no longer hold the quantity it did before
| population | the type of population(plebs, aristocrats, ...) |
| housing | the housing that downgraded |
| quantity | quantity that no longer fits into the housing |
Implements CityBuilderCore.IPopulationManager.
|
inline |
forces immediate redistribution of employees
ususally the manager does this itself, this is called after loading so there is no wait time
Implements CityBuilderCore.IEmploymentManager.
|
inline |
checks how many employees in a population are available for work
| population | the populatio to check |
| group | the group, null for all groups |
Implements CityBuilderCore.IEmploymentManager.
|
inline |
calculates the total quantity of a population that can be housed in the city
| population | the type of population(plebs, aristocrats, ...) |
Implements CityBuilderCore.IPopulationManager.
| int CityBuilderCore.DefaultPopulationManager.GetEmployed | ( | Population | population, |
| EmploymentGroup | group = null ) |
checks how many employees in a population are currently employed
| population | the populatio to check |
| group | the group, null for all groups |
Implements CityBuilderCore.IEmploymentManager.
|
inline |
calculates employment rate for a population(needed/available) 100 jobs for 200 employees > 0.5
300 jobs for 100 employees > 3.0
| population | the populatio to check |
Implements CityBuilderCore.IEmploymentManager.
|
inline |
checks how many employees in a population are currently needed
| population | the populatio to check |
| group | the group, null for all groups |
Implements CityBuilderCore.IEmploymentManager.
|
inline |
checks the current priority of an employment group
the priority determines in which order employees are assigned
| group | the group to check |
Implements CityBuilderCore.IEmploymentManager.
|
inline |
calculates the total quantity of a population currently being housed in the city
| population | the type of population(plebs, aristocrats, ...) |
| includeReserved | whether migrants that have not arrived at their housing should be counted |
Implements CityBuilderCore.IPopulationManager.
|
inline |
calculated how many more of a population fits into the city
| population | the type of population(plebs, aristocrats, ...) |
Implements CityBuilderCore.IPopulationManager.
|
inline |
attempts to find a worker path for a worker
| building | the structure the worker hails from |
| currentPoint | the current position of the worker |
| worker | the type of worker(mason, carpenter, ...) |
| storage | the storage the worker has available to carry supply to its workplace |
| maxDistance | maximum distance to workplace |
| pathType | the type of pathing the worker uses to get around |
| pathTag | additional parameter for pathfinding |
Implements CityBuilderCore.IWorkplaceFinder.
|
inline |
attempts to find a worker path for a worker
| building | the structure the worker hails from |
| currentPoint | the current position of the worker |
| worker | the type of worker(mason, carpenter, ...) |
| storage | the storage the worker has available to carry supply to its workplace |
| maxDistance | maximum distance to workplace |
| pathType | the type of pathing the worker uses to get around |
| pathTag | additional parameter for pathfinding |
Implements CityBuilderCore.IWorkplaceFinder.
|
inline |
calculates worker rate for population(available/needed) 100 jobs for 200 employees > 2.0
300 jobs for 150 employees > 0.5
| population | the populatio to check |
Implements CityBuilderCore.IEmploymentManager.
|
inline |
removes an employment that was previously added to the manager, the employment will no longer have any employees assigned
typically called in OnDestroy
| employment | the employment that will no longer be managed here |
Implements CityBuilderCore.IEmploymentManager.
|
inline |
changes the priority of an employment group
this changes which employment groups employees are distributed to first
| group | |
| priority |
Implements CityBuilderCore.IEmploymentManager.