User Tools

Site Tools


api:comp_resource_generator

COMP_RESOURCE_GENERATOR

Category: Component

Parent class: COMPONENT

Properties


GrowRate

Serialized, Savegame

  • Type: float
  • Expected: float value
  • Default value: 1.0f

MaxQuantity

Serialized, Savegame

  • Type: integer
  • Expected: integer value
  • Default value: 1000

Functions


getResourceGeneratorData

BUILDING_FUNCTION_RESOURCE_GENERATOR getResourceGeneratorData()


setResourceGeneratorData

void setResourceGeneratorData(resourceGeneratorData)

Name Type Description
resourceGeneratorData BUILDING_FUNCTION_RESOURCE_GENERATOR

setMaxQuantity

void setMaxQuantity(maxQuantity [, addDifference])

Name Type Description
maxQuantity integer
addDifference boolean If true, we will add/substract the current inventory with the difference between current max quantity and maxQuantity.

getResourceGenerated

RESOURCE getResourceGenerated()

api/comp_resource_generator.txt · Last modified: 2022/12/02 14:09 (external edit)