Worker Class

Inherits: LiveObject

Properties
animationDie dressDuration dressType educated foodDeclining frozen happiness happinessMax healthMax hungry immunityDeclining name radius saddleAnimal satietyCoefficient satietyMax sphereCenter sphereRadius toolDuration toolType visitHouse warmMax warmNormal weightMax windowPos workHouse workRole

Functions
addCraftTasks addTaskApplyVisitor addTaskAttachModel attachTool bringFromNearestBuilding buildingCrafting buildingExtracting buildingFishing changeDress checkSurvived checkWarmAndSaiety clearAllTasks depositToCraftBuilding depositToHouse doMine dressingEfforts dropHouse dropVisitHouse dropWorkHouse drunkennessEfforts eat equipmentEfforts findAndTransferHouseFood findAndTransferHouseWarm findBarnOrMarketWithRes findBarnToDeposit findBarnWithRes findVisitingBarnWithRes fireFight getAvatarImageName getMaxTransportCount getMaxTransportCountWithAdditonWeight getResource getResourceOptimized getWork getWorkerSkeleton haveAdditionWeight heavyHealingEfforts hospitalVisitEfforts houseEfforts init isChild isElder isGrown isOldEnoughToChildbearing isOldEnoughToEducation isOldEnoughToServeHouse isOldEnoughToWork isTeenager lightHealingEfforts mineResource mineSource nearestResourceOutEfforts noworkUpdate onChangeDress onNewAge passDonkey pickNearestResource pickResource playerBuild playerCraft playerDropResource playerExtinguishBuilding playerFireFight playerKillAnimal playerMineSource playerPickSource playerPutResource playerRepair playerRepairBuilding playerResourceExtracting playerTakeResource putResource putResourceOptimized repair resourceOutEfforts resourcesEfforts rideEfforts setAdditionWeight setDisease setHouse setIgnoreNextSurviveUpdate showWindow storeToNearestBuilding study surviveUpdate takeOffResource takeResource transferResourceOut updateDisease updateSchoolStatus visitSchoolEfforts workFishing

.animationDie
Type: string [Read Only]

.dressDuration
Type: number [Read Only]

.dressType
Type: string

.educated
Type: boolean [Read Only]

.foodDeclining
Type: number [Read Only]

.frozen
Type: boolean [Read Only]

.happiness
Type: number [Read Only]

.happinessMax
Type: number [Read Only]

.healthMax
Type: number [Read Only]

.hungry
Type: boolean [Read Only]

.immunityDeclining
Type: number [Read Only]

.name
Type: string

.radius
Type: number [Read Only]

.saddleAnimal
Type: Animal

.satietyCoefficient
Type: number [Read Only]

.satietyMax
Type: number [Read Only]

.sphereCenter
Type: Vector2 [Read Only]

.sphereRadius
Type: number [Read Only]

.toolDuration
Type: number [Read Only]

.toolType
Type: string

.visitHouse
Type: Building

.warmMax
Type: number [Read Only]

.warmNormal
Type: number [Read Only]

.weightMax
Type: number [Read Only]

.windowPos
Type: Vector2 [Read Only]

.workHouse
Type: Building

.workRole
Type: string

addCraftTasks
function addCraftTasks(b, craftName, craftResult, craftAnimation, craftScript)

addTaskApplyVisitor
function addTaskApplyVisitor(b Building, addVisitor boolean )

addTaskAttachModel
function addTaskAttachModel(prefab string )

attachTool
function attachTool(model string )

bringFromNearestBuilding
function bringFromNearestBuilding(b, res, count, findMarket, radius)

buildingCrafting
function buildingCrafting(b, craftName, craftAnimation, tool, pivotName, craftScript)

buildingExtracting
function buildingExtracting(b, resType, dieChance)

buildingFishing
function buildingFishing(b, resType)

changeDress
function changeDress(dress)

checkSurvived
function checkSurvived

checkWarmAndSaiety
function checkWarmAndSaiety(house, planeTasks)

clearAllTasks
function clearAllTasks

depositToCraftBuilding
function depositToCraftBuilding(b, craftName, checkAction)

depositToHouse
function depositToHouse(b, checkAction)

doMine
function doMine(res, b)

dressingEfforts
function dressingEfforts

dropHouse
function dropHouse

dropVisitHouse
function dropVisitHouse

dropWorkHouse
function dropWorkHouse

drunkennessEfforts
function drunkennessEfforts

eat
function eat(satiety number, foodType string )

equipmentEfforts
function equipmentEfforts

findAndTransferHouseFood
function findAndTransferHouseFood(house, mustSatiety, futureSatiety, planeTasks)

findAndTransferHouseWarm
function findAndTransferHouseWarm(house, mustWarm, futureWarm, strFirewood, strCoal, coalWarm, firewoodWarm, planeTasks)

findBarnOrMarketWithRes
function findBarnOrMarketWithRes(pos, res, radius)

findBarnToDeposit
function findBarnToDeposit(pos, res, count)

findBarnWithRes
function findBarnWithRes(pos, res, radius)

findVisitingBarnWithRes
function findVisitingBarnWithRes(pos, res, radius)

fireFight
function fireFight(fireBuilding)

getAvatarImageName
function getAvatarImageName

getMaxTransportCount
function getMaxTransportCount(resType)

getMaxTransportCountWithAdditonWeight
function getMaxTransportCountWithAdditonWeight(resType)

getResource
function getResource(b, res, count)

getResourceOptimized
function getResourceOptimized(b, res, count)

getWork
function getWork(dt number ) -> number

getWorkerSkeleton
function getWorkerSkeleton

haveAdditionWeight
function haveAdditionWeight -> boolean

heavyHealingEfforts
function heavyHealingEfforts

hospitalVisitEfforts
function hospitalVisitEfforts

houseEfforts
function houseEfforts

init
function init(skeletonName)

isChild
function isChild

isElder
function isElder

isGrown
function isGrown

isOldEnoughToChildbearing
function isOldEnoughToChildbearing

isOldEnoughToEducation
function isOldEnoughToEducation

isOldEnoughToServeHouse
function isOldEnoughToServeHouse

isOldEnoughToWork
function isOldEnoughToWork

isTeenager
function isTeenager

lightHealingEfforts
function lightHealingEfforts

mineResource
function mineResource(res, b)

mineSource
function mineSource(res)

nearestResourceOutEfforts
function nearestResourceOutEfforts

noworkUpdate
function noworkUpdate

onChangeDress
function onChangeDress(dress)

onNewAge
function onNewAge

passDonkey
function passDonkey

pickNearestResource
function pickNearestResource(b, res_type)

pickResource
function pickResource(res)

playerBuild
function playerBuild(b, checkAction)

playerCraft
function playerCraft(b, craftName, craftAnimation, tool, craftScript, checkAction)

playerDropResource
function playerDropResource

playerExtinguishBuilding
function playerExtinguishBuilding(bld Building, checkAction boolean ) -> boolean

playerFireFight
function playerFireFight(fireBuilding, checkAction)

playerKillAnimal
function playerKillAnimal(animal)

playerMineSource
function playerMineSource(res)

playerPickSource
function playerPickSource(res)

playerPutResource
function playerPutResource(b, res, count)

playerRepair
function playerRepair(b, checkAction)

playerRepairBuilding
function playerRepairBuilding(bld Building, checkAction boolean ) -> boolean

playerResourceExtracting
function playerResourceExtracting(b, resType, dieChance, checkAction)

playerTakeResource
function playerTakeResource(uid, res, count)

putResource
function putResource(b, res, count)

putResourceOptimized
function putResourceOptimized(b, res, count)

repair
function repair(b)

resourceOutEfforts
function resourceOutEfforts(nearest)

resourcesEfforts
function resourcesEfforts

rideEfforts
function rideEfforts

setAdditionWeight
function setAdditionWeight(state boolean )

setDisease
function setDisease(pDiseaseDesc DiseaseConfig )

setHouse
function setHouse(bld Building )

setIgnoreNextSurviveUpdate
function setIgnoreNextSurviveUpdate(state boolean )

showWindow
function showWindow(newSelected)

storeToNearestBuilding
function storeToNearestBuilding(b, res, count)

study
function study(time number, loading boolean )

surviveUpdate
function surviveUpdate

takeOffResource
function takeOffResource(b, res, count)

takeResource
function takeResource(uid, res, count)

transferResourceOut
function transferResourceOut(resOut)

updateDisease
function updateDisease

updateSchoolStatus
function updateSchoolStatus

visitSchoolEfforts
function visitSchoolEfforts

workFishing
function workFishing(b, resType)