Table of Contents
MANDATE
Abstract class
Extendable
Category: Data
Properties
AssetMandate
Name
Behavior
ResourceListNeeded
- Can also be built from:
list<RESOURCE_QUANTITY_PAIR>
- Expected:
RESOURCE_COLLECTION_VALUE value
orlist of RESOURCE_QUANTITY_PAIR values
AssignedVillager
IsDisabled
- 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
update
startMandate
onStartClickCallback
void onStartClickCallback()
This is called when you click on the \'start\' button of the mandate in the Mandate Window
getCurrentStateText
getRemainingTime
float getRemainingTime()
getCost
RESOURCE_COLLECTION_VALUE 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
isEnabled
boolean isEnabled()
isDisabled
boolean isDisabled()
setEnabled
void setEnabled(isEnabled)
Name | Type | Description |
---|---|---|
isEnabled | boolean |
addDelayBeforeEnabled
void addDelayBeforeEnabled(timeDelay [, disableMandate])
Name | Type | Description |
---|---|---|
timeDelay | float | |
disableMandate | boolean |
getDelayBeforeEnabledInDays
integer getDelayBeforeEnabledInDays()
cancelMandate
completeMandate
Virtual function, Protected function
void completeMandate()
Events
ON_MANDATE_STATE_CHANGED
ON_MANDATE_STATE_CHANGED()
Call this event when you update your mandate. This will update the status string in the UI.