User Tools

Site Tools


api:comp_workplace

COMP_WORKPLACE

Extendable
Category: Component

Parent class: COMPONENT
Inherited by:

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

Virtual function

void init()


update

Virtual function

void update()


finalize

Virtual function

void finalize(isClearingLevel)

Name Type Description
isClearingLevel boolean

setWorkplaceData

Virtual function

void setWorkplaceData(workplaceData)

Name Type Description
workplaceData BUILDING_FUNCTION_WORKPLACE

registerVillager

Virtual function

boolean registerVillager(villager)

Name Type Description
villager COMP_VILLAGER

unregisterVillager

Virtual function

boolean unregisterVillager(villager)

Name Type Description
villager COMP_VILLAGER

getGatherableTargetPosition

Virtual function

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(list<RESOURCE_QUANTITY_PAIR>)

api/comp_workplace.txt · Last modified: 2020/10/22 10:16 (external edit)