====== COMP_WORKPLACE ====== **[[:custom-classes#Extendable classes|Extendable]]**\\ **Category**: Component Parent class: [[:api:component|COMPONENT]]\\ Inherited by: * [[:api:comp_bailiff_office|COMP_BAILIFF_OFFICE]] * [[:api:comp_builder_workshop|COMP_BUILDER_WORKSHOP]] * [[:api:comp_farm|COMP_FARM]] * [[:api:comp_farm_livestock|COMP_FARM_LIVESTOCK]] * [[:api:comp_workplace_forester|COMP_WORKPLACE_FORESTER]] * [[:api:comp_workplace_kitchen|COMP_WORKPLACE_KITCHEN]] * [[:api:comp_workplace_tax_office|COMP_WORKPLACE_TAX_OFFICE]] ===== Properties ===== ---- ==== AssignedWorkerList ==== //[[:annotations#serialized|Serialized]], [[:annotations#savegame|Savegame]]// * **Type**: ''[[:data-types#list|list]]<[[:api:comp_villager|COMP_VILLAGER]]>'' * **Expected**: ''list of pairs of asset ID and component data type'' ---- ==== ActiveVillagerProductionProgressList ==== //[[:annotations#serialized|Serialized]], [[:annotations#savegame|Savegame]]// * **Type**: ''[[:data-types#list|list]]<[[:api:villager_value_pair|VILLAGER_VALUE_PAIR]]>'' * **Expected**: ''list of VILLAGER_VALUE_PAIR values'' ---- ==== IsPaused ==== //[[:annotations#serialized|Serialized]], [[:annotations#savegame|Savegame]]// * **Type**: ''[[:data-types#boolean|boolean]]'' * **Expected**: ''boolean value'' * **Default value**: ''false'' ---- ==== CurrentProductionCycleCount ==== //[[:annotations#serialized|Serialized]], [[:annotations#savegame|Savegame]]// * **Type**: ''[[:data-types#integer_and_unsigned_integer|integer_and_unsigned_integer]]'' * **Expected**: ''integer value'' * **Default value**: ''0'' ---- ==== CurrentProductionAmountList ==== //[[:annotations#serialized|Serialized]], [[:annotations#savegame|Savegame]]// * **Type**: ''[[:data-types#list|list]]<[[:data-types#float|float]]>'' * **Expected**: ''list of float values'' ===== Functions ===== ---- ==== update ==== //[[:custom-classes#Extendable classes|Virtual function]]// ''void **update**()'' ---- ==== setWorkplaceData ==== //[[:custom-classes#Extendable classes|Virtual function]]// ''void **setWorkplaceData**(//workplaceData//)'' ^ Name ^ Type ^ Description ^ | //''workplaceData''// | ''[[:api:building_function_workplace|BUILDING_FUNCTION_WORKPLACE]]'' | | ---- ==== registerVillager ==== //[[:custom-classes#Extendable classes|Virtual function]]// ''[[:data-types#boolean|boolean]] **registerVillager**(//villager//)'' ^ Name ^ Type ^ Description ^ | //''villager''// | ''[[:api:comp_villager|COMP_VILLAGER]]'' | | ---- ==== unregisterVillager ==== //[[:custom-classes#Extendable classes|Virtual function]]// ''[[:data-types#boolean|boolean]] **unregisterVillager**(//villager//)'' ^ Name ^ Type ^ Description ^ | //''villager''// | ''[[:api:comp_villager|COMP_VILLAGER]]'' | | ---- ==== getGatherableTargetPosition ==== //[[:custom-classes#Extendable classes|Virtual function]]// ''void **getGatherableTargetPosition**(//villager//, //resource//, //resourcePosition//, //aroundResourcePosition//)'' ^ Name ^ Type ^ Description ^ | //''villager''// | ''[[:api:comp_villager|COMP_VILLAGER]]'' | | | //''resource''// | ''[[:api:comp_resource_container|COMP_RESOURCE_CONTAINER]]'' | | | //''resourcePosition''// | ''[[:api:behavior_tree_data_location|BEHAVIOR_TREE_DATA_LOCATION]]'' | | | //''aroundResourcePosition''// | ''[[:api:behavior_tree_data_location|BEHAVIOR_TREE_DATA_LOCATION]]'' | | ===== Events ===== ---- ==== ON_ASSIGNED_WORKER_CHANGED ==== ''ON_ASSIGNED_WORKER_CHANGED([[:api:comp_villager|COMP_VILLAGER]])'' ---- ==== ON_WORKPLACE_PAUSED ==== ''ON_WORKPLACE_PAUSED([[:data-types#boolean|boolean]])'' ---- ==== ON_WORKPLACE_PRODUCED ==== ''ON_WORKPLACE_PRODUCED([[:api:resource_collection_value|RESOURCE_COLLECTION_VALUE]])'' ---- ==== ON_WORKPLACE_STATUS_UPDATE ==== ''ON_WORKPLACE_STATUS_UPDATE()'' ---- ==== ON_WORKPLACE_DATA_SET ==== ''ON_WORKPLACE_DATA_SET([[:api:building_function|BUILDING_FUNCTION]])'' ---- ==== ON_WORKPLACE_PRODUCTION_UPDATE ==== ''ON_WORKPLACE_PRODUCTION_UPDATE()'' ---- ==== ON_RESOURCE_DEPOT_LIST_UPDATE ==== ''ON_RESOURCE_DEPOT_LIST_UPDATE()''