User Tools

Site Tools


api:mandate

MANDATE

Abstract class
Extendable
Category: Data

Cloneable

Properties


AssetMandate

Runtime only, Savegame


Name

Runtime only, Savegame

  • Type: string
  • Expected: string value

Behavior

Runtime only, Savegame


ResourceListNeeded

Runtime only, Savegame


AssignedVillager

Runtime only, Savegame

  • Expected: pair of asset ID and component data type

IsDisabled

Runtime only, Savegame

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

Functions


initialize

void initialize(mandateType)

Call after creation of your instance

Name Type Description
mandateType MANDATE_TYPE

init

Virtual function

void init()

This is called on load of the game


update

Virtual function

void update(level)

Name Type Description
level LEVEL

startMandate

Virtual function

void startMandate()

This is called when the Bailiff starts this mandate


onStartClickCallback

Virtual function

void onStartClickCallback()

This is called when you click on the \'start\' button of the mandate in the Mandate Window


getCurrentStateText

Virtual function

string getCurrentStateText()


getRemainingTime

float getRemainingTime()


getCost

addMandateCostModifier

void addMandateCostModifier(costMultiplicator)

Name Type Description
costMultiplicator float

removeMandateCostModifier

void removeMandateCostModifier(costMultiplicator)

Name Type Description
costMultiplicator float

addMandateTimeModifier

void addMandateTimeModifier(timeMultiplicator)

Name Type Description
timeMultiplicator float

removeMandateTimeModifier

void removeMandateTimeModifier(timeMultiplicator)

Name Type Description
timeMultiplicator float

decreaseRemainingTime

void decreaseRemainingTime(deltaTime)

Name Type Description
deltaTime float

getRemainingTimeRatio

float getRemainingTimeRatio()


isRequiringBailiff

boolean isRequiringBailiff()


getAssignedVillager

COMP_VILLAGER getAssignedVillager()


setAssignedVillager

void setAssignedVillager(assignedVillager)

Name Type Description
assignedVillager COMP_VILLAGER

isDisabled

boolean isDisabled()


setIsDisabled

void setIsDisabled(isDisabled)

Name Type Description
isDisabled boolean

cancelMandate

Virtual function, Protected function

void cancelMandate()


completeMandate

Virtual function, Protected function

void completeMandate()

api/mandate.txt · Last modified: 2022/11/17 19:03 (external edit)