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
getDurationInSec
float getDurationInSec()
getRemainingTime
float getRemainingTime()
getCost
RESOURCE_COLLECTION_VALUE getCost()
addMandateCostModifier
removeMandateCostModifier
addMandateTimeModifier
removeMandateTimeModifier
decreaseRemainingTime
getRemainingTimeRatio
float getRemainingTimeRatio()
isRequiringBailiff
boolean isRequiringBailiff()
getAssignedVillager
COMP_VILLAGER getAssignedVillager()
setAssignedVillager
isEnabled
boolean isEnabled()
isActive
boolean isActive()
isDisabled
boolean isDisabled()
setEnabled
addDelayBeforeEnabled
void addDelayBeforeEnabled(timeDelay [, disableMandate])
getDelayBeforeEnabledInDays
integer_and_unsigned_integer getDelayBeforeEnabledInDays()
cancelMandate
completeMandate
getDelayBeforeEnabledTimeRatio
float getDelayBeforeEnabledTimeRatio()
getDelayBeforeEnabled
float getDelayBeforeEnabled()
isValid
boolean isValid()
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.