User Tools

Site Tools


preview:api:comp_workplace

This is an old revision of the document!


COMP_WORKPLACE

Category: Component

Extendable

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

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

boolean registerVillager(villager)

Name Type Description
villager COMP_VILLAGER

unregisterVillager

boolean unregisterVillager(villager)

Name Type Description
villager COMP_VILLAGER

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

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki