User Tools

Site Tools


api:comp_workplace

COMP_WORKPLACE

Properties


AssignedWorkerList

Serialized, Savegame

  • Expected: list of pairs of asset ID and component data type

ActiveVillagerProductionProgressList

Serialized, Savegame


IsPaused

Serialized, Savegame

  • Type: boolean
  • Expected: boolean value
  • Default value: false

CurrentProductionCycleCount

Serialized, Savegame


CurrentProductionAmountList

Serialized, Savegame

  • Type: list<float>
  • Expected: list of float values

Functions


update

Virtual function

void update()


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(RESOURCE_COLLECTION_VALUE)


ON_WORKPLACE_STATUS_UPDATE

ON_WORKPLACE_STATUS_UPDATE()


ON_WORKPLACE_DATA_SET

ON_WORKPLACE_DATA_SET(BUILDING_FUNCTION)


ON_WORKPLACE_PRODUCTION_UPDATE

ON_WORKPLACE_PRODUCTION_UPDATE()


ON_RESOURCE_DEPOT_LIST_UPDATE

ON_RESOURCE_DEPOT_LIST_UPDATE()

api/comp_workplace.txt · Last modified: 2024/02/06 13:53 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki