Doctor Class
A Doctor (Researcher,Surgan,Psychologist)
Inheritance: Doctor » Staff » Humanoid » Entity
Method Index
- _calculateTrainingPerformance(doc_atd, con_skill, class_size)
- _handleEmptyActionQueue() (inherited from Humanoid)
- _tick() (inherited from Entity)
- adviseWrongPersonForThisRoom() (overrides Staff:adviseWrongPersonForThisRoom)
- afterLoad(old, new) (overrides Staff:afterLoad)
- changeAttribute(attribute, amount) (inherited from Humanoid)
- checkIfNeedRest() (inherited from Staff)
- checkIfWaitedTooLongForRaise() (inherited from Staff)
- clearDynamicInfo() (inherited from Entity)
- despawn() (inherited from Staff)
- die() (inherited from Staff)
- dump() (inherited from Staff)
- eraseObject() (inherited from Entity)
- findObjectsInSquare(size, object_spec) (inherited from Humanoid)
- finishAction(action) (inherited from Humanoid)
- fire() (inherited from Staff)
- fulfillsCriterion(criterion) (overrides Staff:fulfillsCriterion)
- 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() (inherited from Staff)
- getTile() (inherited from Entity)
- goToStaffRoom() (inherited from Staff)
- goingToUseObject(object_type) (inherited from Humanoid)
- handleRemovedObject(object) (inherited from Humanoid)
- hasDressingAndLeavingAction() (inherited from Humanoid)
- hasLeavingAction() (inherited from Humanoid)
- hasSpecialism(trait)
- increaseWage(amount) (inherited from Staff)
- isCrackUpTired() (inherited from Staff)
- isEnteringRoom() (inherited from Humanoid)
- isIdle() (inherited from Staff)
- isKnockingDoor() (inherited from Humanoid)
- isLearning()
- isLearningOnTheJob()
- isLeaving() (inherited from Humanoid)
- isMeandering() (inherited from Humanoid)
- isMoodActive(mood) (inherited from Humanoid)
- isObscuringArea(x1, x2, y1, y2) (inherited from Humanoid)
- isResearching()
- isResting() (inherited from Staff)
- isTiring() (inherited from Staff)
- isType(humanoid_class) (inherited from Humanoid)
- isVeryTired() (inherited from Staff)
- leaveArea() (inherited from Humanoid)
- notifyNewObject(id) (inherited from Entity)
- notifyNewRoom(room) (inherited from Staff)
- notifyOfStaffChange(staff) (inherited from Humanoid)
- onClick(ui, button) (inherited from Staff)
- onDestroy() (inherited from Staff)
- onPickUp() (inherited from Entity)
- onPickup() (overrides Staff:onPickup)
- onPlaceInCorridor() (inherited from Staff)
- 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() (inherited from Staff)
- requestRaise() (inherited from Staff)
- resetAnimation() (inherited from Entity)
- resetSurgeonState()
- setAnimation(animation, flags) (inherited from Entity)
- setCallCompleted() (inherited from Humanoid)
- setCrazy(crazy)
- setDynamicInfo(type, value) (inherited from Entity)
- setDynamicInfoText(text) (inherited from Staff)
- setHospital(hospital) (inherited from Staff)
- 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) (inherited from Staff)
- setPosition(x, y) (inherited from Entity)
- setProfile(profile) (overrides Staff:setProfile)
- 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 Staff:tick)
- tickDay() (overrides Staff:tickDay)
- tire(amount) (inherited from Staff)
- tostring() (overrides Staff:tostring)
- trainSkills(consultant, room_factor, student_count)
- 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() (inherited from Staff)
- updateSkill(trait, amount)
- updateSpeed() (inherited from Staff)
- updateStaffTitle()
- wake(amount) (inherited from Staff)
- 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 (*)
- is_crazy
- 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 Doctor:Doctor(...)
Parameters:
| Name | Type | Description |
|---|---|---|
| ... | ? | Arguments to base class constructor. |
Declared on: line 33 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor._calculateTrainingPerformance(doc_atd, con_skill, class_size)
Generate the performance factor of the training room
Parameters:
| Name | Type | Description |
|---|---|---|
| doc_atd | number | Attention to detail of student |
| con_skill | number | Skill level of consultant |
| class_size | number | Total students in the training room |
Declared on: line 177 of Lua/entities/humanoids/staff/doctor.lua.
Note: Is a function rather than a method.
function Doctor:adviseWrongPersonForThisRoom()
Overrides: Staff:adviseWrongPersonForThisRoom.
Declared on: line 345 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:afterLoad(old, new)
Parameters:
| Name | Type | Description |
|---|---|---|
| old | ? | ? |
| new | ? | ? |
Overrides: Staff:afterLoad.
Declared on: line 357 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor: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 | ? | ? |
Overrides: Staff:fulfillsCriterion.
Declared on: line 333 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:hasSpecialism(trait)
Confirm doctor has specialism
Parameters:
| Name | Type | Description |
|---|---|---|
| trait | string | what to check (in is_xxx format) |
Declared on: line 165 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:isLearning()
Determine if the staff member should increase their skills
Declared on: line 96 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:isLearningOnTheJob()
Declared on: line 107 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:isResearching()
Determine if the staff member should contribute to research
Declared on: line 87 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:onPickup()
Overrides: Staff:onPickup.
Declared on: line 311 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:resetSurgeonState()
Function resets "Surgeon" state for Doctor.
Useful for case when on picking up Doctor from Operating Theatre
we need to switching him back to regular clothes and type.
Declared on: line 316 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:setCrazy(crazy)
Parameters:
| Name | Type | Description |
|---|---|---|
| crazy | ? | ? |
Declared on: line 292 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:setProfile(profile)
Parameters:
| Name | Type | Description |
|---|---|---|
| profile | ? | ? |
Overrides: Staff:setProfile.
Declared on: line 116 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:tick()
Overrides: Staff:tick.
Declared on: line 73 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:tickDay()
Overrides: Staff:tickDay.
Declared on: line 39 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:tostring()
Return string representation
Adds Doctor statistics for a "Doctor" object
Overrides: Staff:tostring.
Declared on: line 365 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:trainSkills(consultant, room_factor, student_count)
any amount towards a specialist skill being taught
There are detailed explanations on the logic to these calculations in the Wiki
Parameters:
| Name | Type | Description |
|---|---|---|
| consultant | entity | The person teaching the student |
| room_factor | number | What score training objects in the room give |
| student_count | number | Total number of students present |
Declared on: line 208 of Lua/entities/humanoids/staff/doctor.lua.
function Doctor:updateSkill(trait, amount)
Assign skill points
Parameters:
| Name | Type | Description |
|---|---|---|
| trait | string | The trait of focus |
| amount | number | The amount granted |
Declared on: line 121 of Lua/entities/humanoids/staff/doctor.lua.