Table of Contents
MANDATE
Abstract class
Extendable
Category: Data
Properties
AssetMandate
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
getCurrentStateText
getDurationInSec
float getDurationInSec()
getRemainingTime
float getRemainingTime()
getCost
INST_UNLOCKABLE_COST getCost()
addMandateCostModifier
removeMandateCostModifier
addMandateTimeModifier
removeMandateTimeModifier
decreaseRemainingTime
getRemainingTimeRatio
float getRemainingTimeRatio()
isRequiringBailiff
boolean isRequiringBailiff()
getAssignedVillager
COMP_VILLAGER getAssignedVillager()
setAssignedVillager
isEnabled
boolean isEnabled()
isVisible
boolean isVisible()
isActive
boolean isActive()
isDisabled
boolean isDisabled()
setEnabled
setVisible
addDelayBeforeEnabled
void addDelayBeforeEnabled(timeDelay [, disableMandate])
getDelayBeforeEnabledInDays
integer_and_unsigned_integer getDelayBeforeEnabledInDays()
cancelMandate
completeMandate
getDelayBeforeEnabledTimeRatio
float getDelayBeforeEnabledTimeRatio()
getDelayBeforeEnabled
float getDelayBeforeEnabled()
isValid
internalOnStartClickCallback
Virtual function, Protected function
void internalOnStartClickCallback(assetRelatedJob)
This is called when you click on the \'start\' button of the mandate in the Mandate Window
Name | Type | Description |
---|---|---|
assetRelatedJob | JOB |
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.