preview:api:comp_workplace
This is an old revision of the document!
Table of Contents
COMP_WORKPLACE
Properties
AssignedWorkerList
- Type:
list<COMP_VILLAGER>
- Expected:
List of Pair of asset ID and component data type
PendingProductionCount
- Type:
integer
- Default value:
0
IsPaused
- Type:
boolean
- Default value:
false
CurrentProductionAmountList
- Type:
list<float>
Functions
init
void init()
update
void update()
finalize
void finalize(isClearingLevel)
Name | Type | Description |
---|---|---|
isClearingLevel | boolean |
setWorkplaceData
void setWorkplaceData(workplaceData)
Name | Type | Description |
---|---|---|
workplaceData | BUILDING_FUNCTION_WORKPLACE |
registerVillager
unregisterVillager
getGatherableTargetPosition
void getGatherableTargetPosition(villager, resource, resourcePosition, aroundResourcePosition)
Name | Type | Description |
---|---|---|
villager | COMP_VILLAGER | |
resource | COMP_RESOURCE_CONTAINER | |
resourcePosition | BEHAVIOR_TREE_DATA_LOCATION | |
aroundResourcePosition | BEHAVIOR_TREE_DATA_LOCATION |
Events
ON_ASSIGNED_WORKER_CHANGED
ON_ASSIGNED_WORKER_CHANGED(COMP_VILLAGER)
ON_WORKPLACE_PAUSED
ON_WORKPLACE_PAUSED(boolean)
ON_WORKPLACE_PRODUCED
ON_WORKPLACE_PRODUCED()
preview/api/comp_workplace.1594158723.txt.gz · Last modified: 2020/07/07 17:52 by maxime