User Tools

Site Tools


api:taxation_function

TAXATION_FUNCTION

Abstract class
Category: Asset

Parent class: ASSET
Inherited by:

List of TAXATION_FUNCTION assets

Properties


MinimalTimeBetweenVisits

Serialized


Texture

Serialized

  • Type: TEXTURE
  • Expected: asset ID
  • Default value: nil

NameKey

Serialized

  • Type: string
  • Expected: string value

TaxedNameKey

Serialized

  • Type: string
  • Expected: string value

DescriptionKey

Serialized

  • Type: string
  • Expected: string value

CategoryKey

Serialized

  • Type: string
  • Expected: string value

IsActiveByDefault

Serialized

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

IsVisitBuilding

Serialized

If true, will visit building. If false, will visit buildable (part or building). If fails, will visit owner of taxable component.

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

IsOtherTax

Serialized

  • Type: boolean
  • Expected: boolean value
  • Default value: true

Functions


init

Virtual function

void init(instTaxationFunction)

Name Type Description
instTaxationFunction INST_TAXATION_FUNCTION

finalize

Virtual function

void finalize(instTaxationFunction)

Function called when taxation function is removed. You can cleanup components added during init (except TaxCollectables, those will be managed by the system).

Name Type Description
instTaxationFunction INST_TAXATION_FUNCTION

collect

Virtual function

INST_TAXATION_COLLECT_INFO collect(compTaxCollectable)

Function called every frame to compute how much to cumulate.

Name Type Description
compTaxCollectable COMP_TAX_COLLECTABLE

getMaximumAmountToCollect

Virtual function

integer_and_unsigned_integer getMaximumAmountToCollect(compTaxCollectable)

Name Type Description
compTaxCollectable COMP_TAX_COLLECTABLE

getMinimalTimeBetweenVisits

Virtual function

float getMinimalTimeBetweenVisits()


getTaxedCount

Virtual function

integer_and_unsigned_integer getTaxedCount(instTaxationFunction)

Name Type Description
instTaxationFunction INST_TAXATION_FUNCTION

registerAmountAvailableToCollect

Virtual function

void registerAmountAvailableToCollect(compTaxCollectable)

Name Type Description
compTaxCollectable COMP_TAX_COLLECTABLE
api/taxation_function.txt · Last modified: 2025/04/30 14:22 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki