====== BUILDING_FUNCTION ====== **[[:custom-classes#Extendable classes|Extendable]]**\\ **Category**: Asset Parent class: [[:api:asset | ASSET]]\\ Inherited by: * [[:api:building_function_accommodation | BUILDING_FUNCTION_ACCOMMODATION]] * [[:api:building_function_assignable | BUILDING_FUNCTION_ASSIGNABLE]] * [[:api:building_function_belfry | BUILDING_FUNCTION_BELFRY]] * [[:api:building_function_bridge | BUILDING_FUNCTION_BRIDGE]] * [[:dlc:agriculture|{{assets:dlc:agriculture.png?16x16|DLC agriculture}}]][[:api:building_function_common_croft_part | BUILDING_FUNCTION_COMMON_CROFT_PART]] * [[:api:building_function_entertainment_location | BUILDING_FUNCTION_ENTERTAINMENT_LOCATION]] * [[:api:building_function_great_hall | BUILDING_FUNCTION_GREAT_HALL]] * [[:api:building_function_house | BUILDING_FUNCTION_HOUSE]] * [[:api:building_function_inn | BUILDING_FUNCTION_INN]] * [[:api:building_function_interactive_location | BUILDING_FUNCTION_INTERACTIVE_LOCATION]] * [[:api:building_function_knight_statue | BUILDING_FUNCTION_KNIGHT_STATUE]] * [[:api:building_function_market_tent | BUILDING_FUNCTION_MARKET_TENT]] * [[:api:building_function_monastery | BUILDING_FUNCTION_MONASTERY]] * [[:api:building_function_musical_part | BUILDING_FUNCTION_MUSICAL_PART]] * [[:api:building_function_point_of_interest | BUILDING_FUNCTION_POINT_OF_INTEREST]] * [[:api:building_function_public_lounge_room | BUILDING_FUNCTION_PUBLIC_LOUNGE_ROOM]] * [[:api:building_function_resource_depot | BUILDING_FUNCTION_RESOURCE_DEPOT]] * [[:api:building_function_resource_generator | BUILDING_FUNCTION_RESOURCE_GENERATOR]] * [[:api:building_function_resource_stockpile | BUILDING_FUNCTION_RESOURCE_STOCKPILE]] * [[:api:building_function_training_site | BUILDING_FUNCTION_TRAINING_SITE]] * [[:api:building_function_unique_resource_depot | BUILDING_FUNCTION_UNIQUE_RESOURCE_DEPOT]] * [[:api:building_function_village_center | BUILDING_FUNCTION_VILLAGE_CENTER]] * [[:api:building_function_watchpost | BUILDING_FUNCTION_WATCHPOST]] * [[:api:building_function_worker_capacity_extender | BUILDING_FUNCTION_WORKER_CAPACITY_EXTENDER]] * [[:api:building_function_workplace | BUILDING_FUNCTION_WORKPLACE]] [[:assets:building_function| List of BUILDING_FUNCTION assets]] ===== Properties ===== ---- ==== Name ==== //[[:annotations#serialized|Serialized]]// * **Type**: ''[[:data-types#string|string]]'' * **Expected**: ''string value'' ---- ==== NamePluralKey ==== //[[:annotations#serialized|Serialized]]// * **Type**: ''[[:data-types#string|string]]'' * **Expected**: ''string value'' ---- ==== Description ==== //[[:annotations#serialized|Serialized]]// * **Type**: ''[[:data-types#string|string]]'' * **Expected**: ''string value'' ---- ==== HasMaximumInstance ==== //[[:annotations#serialized|Serialized]]// * **Type**: ''[[:data-types#boolean|boolean]]'' * **Expected**: ''boolean value'' * **Default value**: ''false'' ---- ==== MaximumInstanceAllowed ==== //[[:annotations#serialized|Serialized]]// * **Type**: ''[[:data-types#integer_and_unsigned_integer|integer_and_unsigned_integer]]'' * **Expected**: ''integer value'' * **Default value**: ''1'' ---- ==== UpkeepPerCapacity ==== //[[:annotations#serialized|Serialized]]// * **Type**: ''[[:api:resource_collection_value | RESOURCE_COLLECTION_VALUE]]'' * **Can also be built from**: ''[[:data-types#list|list]]<[[:api:resource_quantity_pair | RESOURCE_QUANTITY_PAIR]]>'' * **Expected**: ''RESOURCE_COLLECTION_VALUE value'' or ''list of RESOURCE_QUANTITY_PAIR values'' ---- ==== UpkeepPerCapacityMultiplier ==== //[[:annotations#serialized|Serialized]]// * **Type**: ''[[:data-types#float|float]]'' * **Expected**: ''float value'' * **Default value**: ''1.0f'' ---- ==== GameRuleModifierList ==== //[[:annotations#serialized|Serialized]]// * **Type**: ''[[:data-types#list|list]]<[[:api:game_rule_modifier | GAME_RULE_MODIFIER]]>'' * **Expected**: ''list of GAME_RULE_MODIFIER values'' ---- ==== IsDescriptionOverride ==== //[[:annotations#serialized|Serialized]]// * **Type**: ''[[:data-types#boolean|boolean]]'' * **Expected**: ''boolean value'' * **Default value**: ''true'' ---- ==== ShowNameInTags ==== //[[:annotations#serialized|Serialized]]// * **Type**: ''[[:data-types#boolean|boolean]]'' * **Expected**: ''boolean value'' * **Default value**: ''false'' ---- ==== IsDisplayable ==== //[[:annotations#serialized|Serialized]]// * **Type**: ''[[:data-types#boolean|boolean]]'' * **Expected**: ''boolean value'' * **Default value**: ''true'' ===== Functions ===== ---- ==== onBuildingFunctionKnown ==== //[[:custom-classes#Extendable classes|Virtual function]]// ''void **onBuildingFunctionKnown**(//level//)'' ^ Name ^ Type ^ Description ^ | //''level''// | ''[[:api:level | LEVEL]]'' | | ---- ==== onBuildingFunctionAvailable ==== //[[:custom-classes#Extendable classes|Virtual function]]// ''void **onBuildingFunctionAvailable**(//level//)'' ^ Name ^ Type ^ Description ^ | //''level''// | ''[[:api:level | LEVEL]]'' | | ---- ==== transferTo ==== //[[:custom-classes#Extendable classes|Virtual function]]// ''void **transferTo**(//buildingPartFrom//, //buildingPartTo//, //outIsForcedUninitialized//)'' ^ Name ^ Type ^ Description ^ | //''buildingPartFrom''// | ''[[:api:comp_building_part | COMP_BUILDING_PART]]'' | | | //''buildingPartTo''// | ''[[:api:comp_building_part | COMP_BUILDING_PART]]'' | | | //''outIsForcedUninitialized''// | ''[[:data-types#boolean|boolean]]'' | //[[:annotations#out_argument|Out argument]]// | ---- ==== canBeReplaced ==== //[[:custom-classes#Extendable classes|Virtual function]]// ''[[:data-types#boolean|boolean]] **canBeReplaced**()'' ---- ==== generateStats ==== //[[:custom-classes#Extendable classes|Virtual function]]// ''[[:api:building_function_stats | BUILDING_FUNCTION_STATS]] **generateStats**()'' ---- ==== fillResourceProducedList ==== //[[:custom-classes#Extendable classes|Virtual function]]// ''void **fillResourceProducedList**(//outAssetResourceProducedList//)'' ^ Name ^ Type ^ Description ^ | //''outAssetResourceProducedList''// | ''[[:data-types#list|list]]<[[:api:resource | RESOURCE]]>'' | //[[:annotations#out_argument|Out argument]]// | ---- ==== activateBuilding ==== //[[:custom-classes#Extendable classes|Virtual function]], [[:custom-classes#Protected|Protected function]]// ''[[:data-types#boolean|boolean]] **activateBuilding**(//object//)'' Deprecated since version 1.9.7; Override onInit instead ^ Name ^ Type ^ Description ^ | //''object''// | ''[[:api:game_object | GAME_OBJECT]]'' | | ---- ==== onInit ==== //[[:custom-classes#Extendable classes|Virtual function]], [[:custom-classes#Protected|Protected function]]// ''[[:data-types#boolean|boolean]] **onInit**(//object//)'' ^ Name ^ Type ^ Description ^ | //''object''// | ''[[:api:game_object | GAME_OBJECT]]'' | | ---- ==== onSetIsActive ==== //[[:custom-classes#Extendable classes|Virtual function]], [[:custom-classes#Protected|Protected function]]// ''void **onSetIsActive**(//object//, //isActive//)'' ^ Name ^ Type ^ Description ^ | //''object''// | ''[[:api:game_object | GAME_OBJECT]]'' | | | //''isActive''// | ''[[:data-types#boolean|boolean]]'' | | ---- ==== reloadBuildingFunction ==== //[[:custom-classes#Extendable classes|Virtual function]], [[:custom-classes#Protected|Protected function]]// ''void **reloadBuildingFunction**(//object//)'' ^ Name ^ Type ^ Description ^ | //''object''// | ''[[:api:game_object | GAME_OBJECT]]'' | | ---- ==== removeBuildingFunction ==== //[[:custom-classes#Extendable classes|Virtual function]], [[:custom-classes#Protected|Protected function]]// ''void **removeBuildingFunction**(//object//)'' ^ Name ^ Type ^ Description ^ | //''object''// | ''[[:api:game_object | GAME_OBJECT]]'' | |