Staff Class
A Doctor, Nurse, Receptionist, Handyman, or Surgeon
Inheritance: Staff » Humanoid » Entity
Subclasses: Doctor, Handyman, Nurse, Receptionist
Method Index
- _handleEmptyActionQueue() (inherited from Humanoid)
- _tick() (inherited from Entity)
- adviseWrongPersonForThisRoom()
- afterLoad(old, new) (overrides Humanoid:afterLoad)
- changeAttribute(attribute, amount) (inherited from Humanoid)
- checkIfNeedRest()
- checkIfWaitedTooLongForRaise()
- clearDynamicInfo() (inherited from Entity)
- despawn() (overrides Humanoid:despawn)
- die()
- dump() (overrides Humanoid:dump)
- eraseObject() (inherited from Entity)
- findObjectsInSquare(size, object_spec) (inherited from Humanoid)
- finishAction(action) (inherited from Humanoid)
- fire() (overrides Humanoid:fire)
- fulfillsCriterion(criterion)
- getAttribute(attribute, default_value) (inherited from Humanoid)
- getCurrentAction() (inherited from Humanoid)
- getCurrentMood() (inherited from Humanoid)
- getDrawingLayer() (inherited from Entity)
- getDynamicInfo() (inherited from Entity)
- getIdleAnimation(humanoid_class) (inherited from Humanoid)
- getRoom() (inherited from Humanoid)
- getServiceQuality() (overrides Humanoid:getServiceQuality)
- getTile() (inherited from Entity)
- goToStaffRoom()
- goingToUseObject(object_type) (inherited from Humanoid)
- handleRemovedObject(object) (inherited from Humanoid)
- hasDressingAndLeavingAction() (inherited from Humanoid)
- hasLeavingAction() (inherited from Humanoid)
- increaseWage(amount)
- isCrackUpTired()
- isEnteringRoom() (inherited from Humanoid)
- isIdle()
- isKnockingDoor() (inherited from Humanoid)
- isLeaving() (inherited from Humanoid)
- isMeandering() (inherited from Humanoid)
- isMoodActive(mood) (inherited from Humanoid)
- isObscuringArea(x1, x2, y1, y2) (inherited from Humanoid)
- isResting()
- isTiring()
- isType(humanoid_class) (inherited from Humanoid)
- isVeryTired()
- leaveArea() (inherited from Humanoid)
- notifyNewObject(id) (inherited from Entity)
- notifyNewRoom(room) (overrides Humanoid:notifyNewRoom)
- notifyOfStaffChange(staff) (inherited from Humanoid)
- onClick(ui, button) (overrides Humanoid:onClick)
- onDestroy() (overrides Humanoid:onDestroy)
- onPickUp() (inherited from Entity)
- onPickup()
- onPlaceInCorridor()
- playAfterLoadSound() (inherited from Entity)
- playEntitySounds(name_pattern, min_silence_lengths, max_silence_lengths, num_silences) (inherited from Entity)
- playSound(name, played_callback, played_callback_delay) (inherited from Entity)
- queueAction(action, pos) (inherited from Humanoid)
- registerRoomBuildCallback(callback) (inherited from Humanoid)
- registerRoomRemoveCallback(callback) (inherited from Humanoid)
- registerStaffChangeCallback(callback) (inherited from Humanoid)
- removeQueuedStaffMessage()
- requestRaise()
- resetAnimation() (inherited from Entity)
- setAnimation(animation, flags) (inherited from Entity)
- setCallCompleted() (inherited from Humanoid)
- setDynamicInfo(type, value) (inherited from Entity)
- setDynamicInfoText(text)
- setHospital(hospital) (overrides Humanoid:setHospital)
- setIfHoverMoodsVisible() (inherited from Humanoid)
- 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)
- setPickup(ui, window_to_close)
- 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)
- setWaitingForSoundEffectsToBeTurnedOn() (inherited from Entity)
- startAction() (inherited from Humanoid)
- tick() (overrides Entity:tick)
- tickDay() (overrides Humanoid:tickDay)
- tire(amount) (overrides Humanoid:tire)
- tostring() (overrides Humanoid:tostring)
- unexpectFromRoom(dest_room) (inherited from Humanoid)
- unregisterCallbacks() (inherited from Humanoid)
- unregisterRoomBuildCallback(callback) (inherited from Humanoid)
- unregisterRoomRemoveCallback(callback) (inherited from Humanoid)
- unregisterStaffChangeCallback(callback) (inherited from Humanoid)
- updateDynamicInfo()
- updateSpeed() (overrides Humanoid:updateSpeed)
- 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 (*)
- dead
- die_anims (*)
- door_anims (*)
- dynamic_info (*)
- dynamic_text
- falling_anim (*)
- fired
- get_up_anim (*)
- goHome (*)
- going_home
- going_to_die (*)
- going_to_staffroom
- has_fallen (*)
- has_vomitted (*)
- hospital
- hover_cursor
- hover_moods (*)
- humanoid_class (*)
- in_room (*)
- last_move_direction (*)
- last_room
- layers (*)
- leave_priority
- leave_sounds
- message_callback
- mood_info (*)
- mood_marker
- next_room_to_visit (*)
- num_animation_ticks (*)
- on_call
- on_ground_anim (*)
- parcelNr
- pee_anim (*)
- permanent_flags (*)
- pickup
- playing_sounds_in_random_sequence (*)
- previous_action (*)
- profile
- quitting_in
- random_sound_sequence_parameters (*)
- remove_callbacks (*)
- shake_fist_anim (*)
- should_knock_on_doors (*)
- skip_next_tick (*)
- slow_animation
- speed
- staff_change_callbacks (*)
- staffroom_needed
- tap_foot_anim (*)
- th (*)
- ticks (*)
- tile_x
- tile_y
- timer_function (*)
- timer_time (*)
- timer_until_raise
- toilet_callback (*)
- user_of
- vomit_anim (*)
- waiting_for_sound_effects_to_be_turned_on (*)
- waiting_for_staffroom
- walk_anims (*)
- world
- yawn_anim (*)
function Staff:Staff(...)
Parameters:
| Name | Type | Description |
|---|---|---|
| ... | ? | Arguments to base class constructor. |
Declared on: line 31 of Lua/entities/humanoids/staff.lua.
function Staff:adviseWrongPersonForThisRoom()
Declared on: line 493 of Lua/entities/humanoids/staff.lua.
function Staff:afterLoad(old, new)
Parameters:
| Name | Type | Description |
|---|---|---|
| old | ? | ? |
| new | ? | ? |
Overrides: Humanoid:afterLoad.
Declared on: line 651 of Lua/entities/humanoids/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 377 of Lua/entities/humanoids/staff.lua.
function Staff:checkIfWaitedTooLongForRaise()
Declared on: line 157 of Lua/entities/humanoids/staff.lua.
function Staff:despawn()
Despawns the staff member and removes them from the hospital
Overrides: Humanoid:despawn.
Declared on: line 275 of Lua/entities/humanoids/staff.lua.
function Staff:dump()
Overrides: Humanoid:dump.
Declared on: line 303 of Lua/entities/humanoids/staff.lua.
function Staff:fire()
Immediately terminate the staff member's employment.
Overrides: Humanoid:fire.
Declared on: line 233 of Lua/entities/humanoids/staff.lua.
function Staff:fulfillsCriterion(criterion)
Helper function to decide if Staff fulfills a criterion
(one of "Doctor", "Nurse", "Psychiatrist", "Surgeon", "Researcher" and "Handyman", "Receptionist", "Junior", "Consultant")
Parameters:
| Name | Type | Description |
|---|---|---|
| criterion | ? | ? |
Declared on: line 487 of Lua/entities/humanoids/staff.lua.
function Staff:getServiceQuality()
Estimate staff service quality based on skills, restfulness (inverse of fatigue) and happiness.
Overrides: Humanoid:getServiceQuality.
Declared on: line 724 of Lua/entities/humanoids/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 589 of Lua/entities/humanoids/staff.lua.
function Staff:isCrackUpTired()
Judge crack up tiredness based on the level config (which has a default of 800)
Declared on: line 753 of Lua/entities/humanoids/staff.lua.
function Staff:isIdle()
Function to decide if staff currently has nothing to do and can be called to a room where they're needed
Declared on: line 512 of Lua/entities/humanoids/staff.lua.
function Staff:isVeryTired()
Judge tiredness based on the level config (which has a default of 700)
Declared on: line 747 of Lua/entities/humanoids/staff.lua.
function Staff:notifyNewRoom(room)
Parameters:
| Name | Type | Description |
|---|---|---|
| room | ? | ? |
Overrides: Humanoid:notifyNewRoom.
Declared on: line 427 of Lua/entities/humanoids/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 281 of Lua/entities/humanoids/staff.lua.
function Staff:onDestroy()
Overrides: Humanoid:onDestroy.
Declared on: line 642 of Lua/entities/humanoids/staff.lua.
function Staff:removeQueuedStaffMessage()
Destroys any raise request window that may be queued
Declared on: line 228 of Lua/entities/humanoids/staff.lua.
function Staff:requestRaise()
Makes the staff member request a raise of 10%, or a wage exactly in the middle of their current and a fair one, whichever is more.
Declared on: line 561 of Lua/entities/humanoids/staff.lua.
function Staff:setDynamicInfoText(text)
Sets dynamic info text before the dynamic info update
Parameters:
| Name | Type | Description |
|---|---|---|
| text | string | the string to append |
Declared on: line 616 of Lua/entities/humanoids/staff.lua.
function Staff:setHospital(hospital)
Sets the Hospital for a member of staff
Parameters:
| Name | Type | Description |
|---|---|---|
| hospital | Hospital | - hospital to assign to member of staff |
Overrides: Humanoid:setHospital.
Declared on: line 480 of Lua/entities/humanoids/staff.lua.
function Staff:setPickup(ui, window_to_close)
Function to set pickup action on staff. Pickup action can be deferred.
Parameters:
| Name | Type | Description |
|---|---|---|
| ui | ? | ? |
| window_to_close | ? | ? |
Declared on: line 447 of Lua/entities/humanoids/staff.lua.
function Staff:setProfile(profile)
Parameters:
| Name | Type | Description |
|---|---|---|
| profile | ? | ? |
Declared on: line 320 of Lua/entities/humanoids/staff.lua.
function Staff:tick()
Overrides: Entity:tick.
Declared on: line 114 of Lua/entities/humanoids/staff.lua.
function Staff:tickDay()
Handle daily adjustments to staff.
Overrides: Humanoid:tickDay.
Declared on: line 40 of Lua/entities/humanoids/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 328 of Lua/entities/humanoids/staff.lua.
function Staff:tostring()
Return string representation
Overrides: Humanoid:tostring.
Declared on: line 740 of Lua/entities/humanoids/staff.lua.
function Staff:updateDynamicInfo()
Updates a staff member's dynamic info
Declared on: line 623 of Lua/entities/humanoids/staff.lua.
function Staff:updateSpeed()
Update the movement speed
Overrides: Humanoid:updateSpeed.
Declared on: line 345 of Lua/entities/humanoids/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 338 of Lua/entities/humanoids/staff.lua.