Staff Class
A Doctor, Nurse, Receptionist, Handyman, or Surgeon
Method Index
- _tick() (inherited from Entity)
- adviseWrongPersonForThisRoom()
- afterLoad(old, new) (overrides Humanoid:afterLoad)
- assignHandymanTask(taskIndex, taskType)
- changeAttribute(attribute, amount) (inherited from Humanoid)
- checkIfNeedRest()
- checkIfWaitedTooLong()
- clearDynamicInfo() (inherited from Entity)
- die()
- dump() (overrides Humanoid:dump)
- finishAction(action) (inherited from Humanoid)
- fire()
- fulfillsCriterion(criterion)
- getCurrentMood() (inherited from Humanoid)
- getDrawingLayer() (overrides Humanoid:getDrawingLayer)
- getDynamicInfo() (inherited from Entity)
- getIdleAnimation(humanoid_class) (inherited from Humanoid)
- getRoom() (inherited from Humanoid)
- goToStaffRoom()
- goingToUseObject(object_type) (inherited from Humanoid)
- handleRemovedObject(object) (inherited from Humanoid)
- hasLeavingAction() (inherited from Humanoid)
- increaseWage(amount)
- interruptHandymanTask()
- isIdle()
- isLearning()
- isLearningOnTheJob()
- isLeaving() (inherited from Humanoid)
- isMoodActive(mood) (inherited from Humanoid)
- isResearching()
- isResting()
- isTiring()
- leaveAnnounce()
- needsWorkStation()
- notifyNewObject(id) (inherited from Entity)
- onClick(ui, button) (overrides Humanoid:onClick)
- onDestroy() (overrides Humanoid:onDestroy)
- onPlaceInCorridor()
- playSound(name) (inherited from Entity)
- queueAction(action, pos) (inherited from Humanoid)
- registerRoomBuildCallback(callback) (inherited from Humanoid)
- registerRoomRemoveCallback(callback) (inherited from Humanoid)
- requestRaise()
- resetAnimation() (inherited from Entity)
- searchForHandymanTask()
- setAnimation(animation, flags) (inherited from Entity)
- setCallCompleted() (inherited from Humanoid)
- setCrazy(crazy)
- setDynamicInfo(type, value) (inherited from Entity)
- setDynamicInfoText(text)
- setHospital(hospital) (overrides Humanoid:setHospital)
- setLayer(layer, id) (inherited from Entity)
- setMood(mood_name, activate) (inherited from Humanoid)
- setMoodInfo(new_mood) (inherited from Entity)
- setNextAction(action, high_priority) (inherited from Humanoid)
- setPosition(x, y) (inherited from Entity)
- setProfile(profile)
- setSpeed(x, y) (inherited from Entity)
- setTile(x, y) (inherited from Entity)
- setTilePositionSpeed(tx, ty, px, py, sx, sy) (inherited from Entity)
- setTimer(tick_count, f) (inherited from Entity)
- setType(humanoid_class) (inherited from Humanoid)
- tick() (overrides Entity:tick)
- tickDay() (overrides Humanoid:tickDay)
- tire(amount) (overrides Humanoid:tire)
- trainSkill(consultant, trait, skill_thres, room_factor, staff_count)
- unregisterCallbacks() (inherited from Humanoid)
- unregisterRoomBuildCallback(callback) (inherited from Humanoid)
- unregisterRoomRemoveCallback(callback) (inherited from Humanoid)
- updateDynamicInfo()
- updateSkill(consultant, trait, amount)
- updateSpeed() (overrides Humanoid:updateSpeed)
- updateStaffTitle()
- wake(amount) (overrides Humanoid:wake)
- walkTo(tile_x, tile_y, must_happen) (inherited from Humanoid)
Member Index
- action_queue
- active_moods (*)
- animation_flags (*)
- animation_idx (*)
- associated_desk (*)
- attributes
- build_callback (*)
- build_callbacks (*)
- check_watch_anim (*)
- die_anims (*)
- door_anims (*)
- dynamic_info (*)
- dynamic_text
- falling_anim (*)
- fired
- get_up_anim (*)
- going_home (*)
- going_to_staffroom
- has_fallen (*)
- has_vomitted (*)
- hospital
- hover_cursor
- humanoid_class
- in_room (*)
- is_crazy
- last_move_direction
- last_room
- layers
- message_callback
- mood_info (*)
- num_animation_ticks (*)
- on_call
- on_ground_anim (*)
- parcelNr
- pee_anim (*)
- permanent_flags (*)
- pickup
- previous_action (*)
- profile
- quitting_in
- remove_callbacks (*)
- shake_fist_anim (*)
- should_knock_on_doors (*)
- skip_next_tick (*)
- slow_animation
- speed
- staffroom_needed
- tap_foot_anim (*)
- task
- th (*)
- ticks (*)
- tile_x
- tile_y
- timer_function (*)
- timer_time (*)
- timer_until_raise
- toilet_callback (*)
- user_of
- vomit_anim (*)
- waiting_for_staffroom
- waiting_on_other_staff
- walk_anims (*)
- world
- yawn_anim (*)
function Staff:Staff(...)
Parameters:
Name | Type | Description |
---|---|---|
... | ? | Arguments to base class constructor. |
Declared on: line 24 of Lua/entities/staff.lua.
function Staff:afterLoad(old, new)
Parameters:
Name | Type | Description |
---|---|---|
old | ? | ? |
new | ? | ? |
Overrides: Humanoid:afterLoad.
Declared on: line 859 of Lua/entities/staff.lua.
function Staff:assignHandymanTask(taskIndex, taskType)
Parameters:
Name | Type | Description |
---|---|---|
taskIndex | ? | ? |
taskType | ? | ? |
Declared on: line 949 of Lua/entities/staff.lua.
function Staff:checkIfNeedRest()
Check if fatigue is over a certain level (decided by the hospital policy),
and go to the StaffRoom if it is.
Declared on: line 544 of Lua/entities/staff.lua.
function Staff:die()
Declared on: line 383 of Lua/entities/staff.lua.
function Staff:dump()
Overrides: Humanoid:dump.
Declared on: line 417 of Lua/entities/staff.lua.
function Staff:fire()
Immediately terminate the staff member's employment.
Declared on: line 353 of Lua/entities/staff.lua.
function Staff:fulfillsCriterion(criterion)
Helper function to decide if Staff fulfills a criterion
(one of "Doctor", "Nurse", "Psychiatrist", "Surgeon", "Researcher" and "Handyman")
Parameters:
Name | Type | Description |
---|---|---|
criterion | ? | ? |
Declared on: line 675 of Lua/entities/staff.lua.
function Staff:getDrawingLayer()
Overrides: Humanoid:getDrawingLayer.
Declared on: line 970 of Lua/entities/staff.lua.
function Staff:increaseWage(amount)
Increases the wage of the staff member. Also increases happiness and clears
any request raise dialogs.
Parameters:
Name | Type | Description |
---|---|---|
amount | integer | The amount, in game dollars per month, to increase the salary by. |
Declared on: line 813 of Lua/entities/staff.lua.
function Staff:isIdle()
Function to decide if staff currently has nothing to do and can be called to a room where he's needed
Declared on: line 726 of Lua/entities/staff.lua.
function Staff:isLearning()
Determine if the staff member should increase their skills
Declared on: line 286 of Lua/entities/staff.lua.
function Staff:isResearching()
Determine if the staff member should contribute to research
Declared on: line 278 of Lua/entities/staff.lua.
function Staff:isResting()
Declared on: line 269 of Lua/entities/staff.lua.
function Staff:isTiring()
Declared on: line 248 of Lua/entities/staff.lua.
function Staff:onClick(ui, button)
Function which is called when the user clicks on the staff member.
Responsible for opening a staff information dialog on left click and picking
up the staff member on right click.
Parameters:
Name | Type | Description |
---|---|---|
ui | GameUI | The UI which the user in question is using. |
button | string | One of: "left", "middle", "right". |
Overrides: Humanoid:onClick.
Declared on: line 394 of Lua/entities/staff.lua.
function Staff:onDestroy()
Overrides: Humanoid:onDestroy.
Declared on: line 850 of Lua/entities/staff.lua.
function Staff:requestRaise()
Makes the staff member request a raise of 10%, or a wage exactly inbetween their current and a fair one, whichever is more.
Declared on: line 791 of Lua/entities/staff.lua.
function Staff:setCrazy(crazy)
Parameters:
Name | Type | Description |
---|---|---|
crazy | ? | ? |
Declared on: line 602 of Lua/entities/staff.lua.
function Staff:setDynamicInfoText(text)
Parameters:
Name | Type | Description |
---|---|---|
text | ? | ? |
Declared on: line 829 of Lua/entities/staff.lua.
function Staff:setHospital(hospital)
Parameters:
Name | Type | Description |
---|---|---|
hospital | ? | ? |
Overrides: Humanoid:setHospital.
Declared on: line 661 of Lua/entities/staff.lua.
function Staff:setProfile(profile)
Parameters:
Name | Type | Description |
---|---|---|
profile | ? | ? |
Declared on: line 440 of Lua/entities/staff.lua.
function Staff:tick()
Overrides: Entity:tick.
Declared on: line 145 of Lua/entities/staff.lua.
function Staff:tickDay()
Overrides: Humanoid:tickDay.
Declared on: line 31 of Lua/entities/staff.lua.
function Staff:tire(amount)
Function for increasing fatigue. Fatigue can be between 0 and 1,
so amounts here should be appropriately small comma values.
Parameters:
Name | Type | Description |
---|---|---|
amount | ? | ? |
Overrides: Humanoid:tire.
Declared on: line 500 of Lua/entities/staff.lua.
function Staff:trainSkill(consultant, trait, skill_thres, room_factor, staff_count)
Parameters:
Name | Type | Description |
---|---|---|
consultant | ? | ? |
trait | ? | ? |
skill_thres | ? | ? |
room_factor | ? | ? |
staff_count | ? | ? |
Declared on: line 343 of Lua/entities/staff.lua.
function Staff:updateSkill(consultant, trait, amount)
Parameters:
Name | Type | Description |
---|---|---|
consultant | ? | ? |
trait | ? | ? |
amount | ? | ? |
Declared on: line 304 of Lua/entities/staff.lua.
function Staff:updateSpeed()
Update the movement speed
Overrides: Humanoid:updateSpeed.
Declared on: line 514 of Lua/entities/staff.lua.
function Staff:wake(amount)
Function for decreasing fatigue. Fatigue can be between 0 and 1,
so amounts here should be appropriately small comma values.
Parameters:
Name | Type | Description |
---|---|---|
amount | ? | ? |
Overrides: Humanoid:wake.
Declared on: line 507 of Lua/entities/staff.lua.