Patient Class
A `Humanoid` who is in the hospital for diagnosis and/or treatment.
Method Index
- _tick() (inherited from Entity)
- addToTreatmentHistory(room)
- afterLoad(old, new) (overrides Humanoid:afterLoad)
- canPeeOrPuke(current)
- changeAttribute(attribute, amount) (inherited from Humanoid)
- checkWatch()
- clearDynamicInfo() (inherited from Entity)
- completeDiagnosticStep(room)
- die()
- dump() (inherited from Humanoid)
- falling()
- fallingAnnounce()
- finishAction(action) (inherited from Humanoid)
- getCurrentMood() (inherited from Humanoid)
- getDrawingLayer() (inherited from Humanoid)
- getDynamicInfo() (inherited from Entity)
- getIdleAnimation(humanoid_class) (inherited from Humanoid)
- getRoom() (inherited from Humanoid)
- goHome(cured)
- goingToUseObject(object_type) (inherited from Humanoid)
- handleRemovedObject(object) (inherited from Humanoid)
- hasLeavingAction() (inherited from Humanoid)
- isLeaving() (inherited from Humanoid)
- isMalePatient()
- isMoodActive(mood) (inherited from Humanoid)
- modifyDiagnosisProgress(incrementValue)
- notifyNewObject(id) (overrides Entity:notifyNewObject)
- onClick(ui, button) (overrides Humanoid:onClick)
- onDestroy() (inherited from Humanoid)
- pee()
- playSound(name) (inherited from Entity)
- queueAction(action, pos) (inherited from Humanoid)
- registerRoomBuildCallback(callback) (inherited from Humanoid)
- registerRoomRemoveCallback(callback) (inherited from Humanoid)
- resetAnimation() (inherited from Entity)
- setAnimation(animation, flags) (inherited from Entity)
- setCallCompleted() (inherited from Humanoid)
- setDiagnosed(diagnosed)
- setDiagnosisProgress(progress)
- setDisease(disease)
- setDynamicInfo(type, value) (inherited from Entity)
- 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)
- setSpeed(x, y) (inherited from Entity)
- setTile(x, y) (overrides Entity:setTile)
- setTilePositionSpeed(tx, ty, px, py, sx, sy) (inherited from Entity)
- setTimer(tick_count, f) (inherited from Entity)
- setType(humanoid_class) (inherited from Humanoid)
- setdiagDiff()
- shake_fist()
- tapFoot()
- tick() (inherited from Entity)
- tickDay() (overrides Humanoid:tickDay)
- tire(amount) (inherited from Humanoid)
- treated()
- unregisterCallbacks() (inherited from Humanoid)
- unregisterRoomBuildCallback(callback) (inherited from Humanoid)
- unregisterRoomRemoveCallback(callback) (inherited from Humanoid)
- updateDynamicInfo(action_string)
- updateMessage(choice)
- updateSpeed() (inherited from Humanoid)
- vomit()
- wake(amount) (inherited from Humanoid)
- walkTo(tile_x, tile_y, must_happen) (inherited from Humanoid)
- yawn()
Member Index
- action_queue
- action_string
- active_moods (*)
- animation_flags (*)
- animation_idx (*)
- associated_desk (*)
- attributes
- available_diagnosis_rooms
- build_callback (*)
- build_callbacks (*)
- check_watch_anim
- cure_rooms_visited
- diagnosed
- diagnosis_difficulty
- diagnosis_progress
- die_anims
- disease
- door_anims (*)
- dynamic_info (*)
- falling_anim
- get_up_anim (*)
- going_home
- going_to_toilet
- has_fallen
- has_vomitted
- hospital
- hover_cursor
- humanoid_class
- in_room
- insurance_company
- is_debug
- is_emergency
- last_move_direction (*)
- layers (*)
- litter_countdown
- message
- message_callback
- mood_info (*)
- num_animation_ticks (*)
- on_call (*)
- on_ground
- on_ground_anim (*)
- pee_anim
- permanent_flags (*)
- previous_action (*)
- profile (*)
- remove_callbacks (*)
- shake_fist_anim
- should_knock_on_doors
- skip_next_tick (*)
- slow_animation (*)
- speed (*)
- tap_foot_anim
- th (*)
- ticks (*)
- tile_x
- tile_y
- timeout
- timer_function (*)
- timer_time (*)
- toilet_callback (*)
- treatment_history
- user_of
- vomit_anim
- waiting
- walk_anims (*)
- world
- yawn_anim
function Patient:Patient(...)
Parameters:
Name | Type | Description |
---|---|---|
... | ? | ? |
Declared on: line 24 of Lua/entities/patient.lua.
function Patient:addToTreatmentHistory(room)
Parameters:
Name | Type | Description |
---|---|---|
room | ? | ? |
Declared on: line 842 of Lua/entities/patient.lua.
function Patient:afterLoad(old, new)
Parameters:
Name | Type | Description |
---|---|---|
old | ? | ? |
new | ? | ? |
Overrides: Humanoid:afterLoad.
Declared on: line 932 of Lua/entities/patient.lua.
function Patient:canPeeOrPuke(current)
Parameters:
Name | Type | Description |
---|---|---|
current | ? | ? |
Declared on: line 244 of Lua/entities/patient.lua.
function Patient:completeDiagnosticStep(room)
Updates the patients diagnostic progress based on the doctors skill
called when they are done using a diagnosis room
Parameters:
Name | Type | Description |
---|---|---|
room | ? | ? |
Declared on: line 116 of Lua/entities/patient.lua.
function Patient:die()
Declared on: line 215 of Lua/entities/patient.lua.
function Patient:falling()
animations for when there is an earth quake
Declared on: line 248 of Lua/entities/patient.lua.
function Patient:goHome(cured)
Parameters:
Name | Type | Description |
---|---|---|
cured | ? | ? |
Declared on: line 426 of Lua/entities/patient.lua.
function Patient:modifyDiagnosisProgress(incrementValue)
Modifies the diagnosis progress of a patient.
incrementValue can be either positive or negative.
Parameters:
Name | Type | Description |
---|---|---|
incrementValue | ? | ? |
Declared on: line 103 of Lua/entities/patient.lua.
function Patient:notifyNewObject(id)
As of now each time a bench is placed the world notifies all patients
in the vicinity through this function.
Parameters:
Name | Type | Description |
---|---|---|
id | ? | ? |
Overrides: Entity:notifyNewObject.
Declared on: line 821 of Lua/entities/patient.lua.
function Patient:onClick(ui, button)
Parameters:
Name | Type | Description |
---|---|---|
ui | ? | ? |
button | ? | ? |
Overrides: Humanoid:onClick.
Declared on: line 34 of Lua/entities/patient.lua.
function Patient:pee()
Declared on: line 357 of Lua/entities/patient.lua.
function Patient:setDiagnosed(diagnosed)
Parameters:
Name | Type | Description |
---|---|---|
diagnosed | ? | ? |
Declared on: line 87 of Lua/entities/patient.lua.
function Patient:setDiagnosisProgress(progress)
Sets the value of the diagnosis progress.
Parameters:
Name | Type | Description |
---|---|---|
progress | ? | ? |
Declared on: line 97 of Lua/entities/patient.lua.
function Patient:setDisease(disease)
Parameters:
Name | Type | Description |
---|---|---|
disease | ? | ? |
Declared on: line 50 of Lua/entities/patient.lua.
function Patient:setHospital(hospital)
Parameters:
Name | Type | Description |
---|---|---|
hospital | ? | ? |
Overrides: Humanoid:setHospital.
Declared on: line 146 of Lua/entities/patient.lua.
function Patient:setTile(x, y)
Called each time the patient moves to a new tile.
Parameters:
Name | Type | Description |
---|---|---|
x | ? | ? |
y | ? | ? |
Overrides: Entity:setTile.
Declared on: line 795 of Lua/entities/patient.lua.
function Patient:tickDay()
This function handles changing of the different attributes of the patient.
For example if thirst gets over a certain level (now: 0.7), the patient
tries to find a drinks machine nearby.
Overrides: Humanoid:tickDay.
Declared on: line 464 of Lua/entities/patient.lua.
function Patient:updateDynamicInfo(action_string)
Parameters:
Name | Type | Description |
---|---|---|
action_string | ? | ? |
Declared on: line 856 of Lua/entities/patient.lua.
function Patient:updateMessage(choice)
Update availability of a choice in message owned by this patient, if any
Parameters:
Name | Type | Description |
---|---|---|
choice | string | The choice that needs updating (currently "research" or "guess_cure"). |
Declared on: line 893 of Lua/entities/patient.lua.
function Patient:vomit()
Declared on: line 320 of Lua/entities/patient.lua.
function Patient:yawn()
Declared on: line 407 of Lua/entities/patient.lua.