====== COMP_RESOURCE_GENERATOR ====== **Category**: Component Parent class: [[:api:component|COMPONENT]]\\ ===== Properties ===== ---- ==== GrowRate ==== //[[:annotations#serialized|Serialized]], [[:annotations#savegame|Savegame]]// * **Type**: ''[[:data-types#float|float]]'' * **Expected**: ''float value'' * **Default value**: ''1.0f'' ---- ==== MaxQuantity ==== //[[:annotations#serialized|Serialized]], [[:annotations#savegame|Savegame]]// * **Type**: ''[[:data-types#integer_and_unsigned_integer|integer_and_unsigned_integer]]'' * **Expected**: ''integer value'' * **Default value**: ''1000'' ===== Functions ===== ---- ==== getResourceGeneratorData ==== ''[[:api:building_function_resource_generator|BUILDING_FUNCTION_RESOURCE_GENERATOR]] **getResourceGeneratorData**()'' ---- ==== setResourceGeneratorData ==== ''void **setResourceGeneratorData**(//resourceGeneratorData//)'' ^ Name ^ Type ^ Description ^ | //''resourceGeneratorData''// | ''[[:api:building_function_resource_generator|BUILDING_FUNCTION_RESOURCE_GENERATOR]]'' | | ---- ==== setMaxQuantity ==== ''void **setMaxQuantity**(//maxQuantity// [, //addDifference//])'' ^ Name ^ Type ^ Description ^ | //''maxQuantity''// | ''[[:data-types#integer_and_unsigned_integer|integer_and_unsigned_integer]]'' | | | //''addDifference''// | ''[[:data-types#boolean|boolean]]'' | If true, we will add/substract the current inventory with the difference between current max quantity and ''maxQuantity''. | ---- ==== getResourceGenerated ==== ''[[:api:resource|RESOURCE]] **getResourceGenerated**()''