CorsixTH Lua Documentation

Handyman Class

A Doctor, Nurse, Receptionist, Handyman, or Surgeon

Declared on: line 26 of Lua/entities/humanoids/staff/handyman.lua.
Inheritance: Handyman » Staff » Humanoid » Entity

Method Index

Member Index

(*) only used in superclass methods
function Handyman:Handyman(...)

Parameters:

NameTypeDescription
... ? Arguments to base class constructor.

Declared on: line 32 of Lua/entities/humanoids/staff/handyman.lua.

function Handyman:afterLoad(old, new)

Parameters:

NameTypeDescription
old ? ?
new ? ?

Overrides: Staff:afterLoad.
Declared on: line 222 of Lua/entities/humanoids/staff/handyman.lua.

function Handyman:assignHandymanTask(task_index, task_type)

Assign a handyman to a task

Parameters:

NameTypeDescription
task_index integer task index
task_type string task type

Declared on: line 171 of Lua/entities/humanoids/staff/handyman.lua.

function Handyman:fulfillsCriterion(criterion)

Helper function to decide if Handyman fulfills a criterion (one of "Doctor", "Nurse", "Psychiatrist", "Surgeon", "Researcher" and "Handyman", "Receptionist", "Junior", "Consultant")

Parameters:

NameTypeDescription
criterion ? ?

Overrides: Staff:fulfillsCriterion.
Declared on: line 87 of Lua/entities/humanoids/staff/handyman.lua.

function Handyman:getPriority(task_type)

Get task type priority value

Parameters:

NameTypeDescription
task_type string task type

Declared on: line 45 of Lua/entities/humanoids/staff/handyman.lua.

function Handyman:releaseHandymanFromTask(reset_action_queue)

Detaches the handyman from the task and forces him to search for a new one.

Parameters:

NameTypeDescription
reset_action_queue bool Should the handyman interrupt the current action to search for a new task

Declared on: line 98 of Lua/entities/humanoids/staff/handyman.lua.

function Handyman:setPriority(task_type, priority)

Set task type priority value

Parameters:

NameTypeDescription
task_type string task type
priority float priority to set

Declared on: line 38 of Lua/entities/humanoids/staff/handyman.lua.

function Handyman:setProfile(profile)

Parameters:

NameTypeDescription
profile ? ?

Overrides: Staff:setProfile.
Declared on: line 73 of Lua/entities/humanoids/staff/handyman.lua.

function Handyman:unassignTask()

If the staff member had a task outstanding, unassigning them from that task. Tasks with no handyman assigned will be eligible for reassignment by the hospital.

Declared on: line 200 of Lua/entities/humanoids/staff/handyman.lua.