CorsixTH Lua Documentation

Staff Class

A Doctor, Nurse, Receptionist, Handyman, or Surgeon

Declared on: line 21 of Lua/entities/staff.lua.
Inheritance: Staff » Humanoid » Entity

Method Index

Member Index

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

Parameters:

NameTypeDescription
... ? Arguments to base class constructor.

Declared on: line 24 of Lua/entities/staff.lua.

function Staff:afterLoad(old, new)

Parameters:

NameTypeDescription
old ? ?
new ? ?

Overrides: Humanoid:afterLoad.
Declared on: line 859 of Lua/entities/staff.lua.

function Staff:assignHandymanTask(taskIndex, taskType)

Parameters:

NameTypeDescription
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: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:

NameTypeDescription
criterion ? ?

Declared on: line 675 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:

NameTypeDescription
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: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:

NameTypeDescription
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: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:

NameTypeDescription
crazy ? ?

Declared on: line 602 of Lua/entities/staff.lua.

function Staff:setDynamicInfoText(text)

Parameters:

NameTypeDescription
text ? ?

Declared on: line 829 of Lua/entities/staff.lua.

function Staff:setHospital(hospital)

Parameters:

NameTypeDescription
hospital ? ?

Overrides: Humanoid:setHospital.
Declared on: line 661 of Lua/entities/staff.lua.

function Staff:setProfile(profile)

Parameters:

NameTypeDescription
profile ? ?

Declared on: line 440 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:

NameTypeDescription
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:

NameTypeDescription
consultant ? ?
trait ? ?
skill_thres ? ?
room_factor ? ?
staff_count ? ?

Declared on: line 343 of Lua/entities/staff.lua.

function Staff:updateSkill(consultant, trait, amount)

Parameters:

NameTypeDescription
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:

NameTypeDescription
amount ? ?

Overrides: Humanoid:wake.
Declared on: line 507 of Lua/entities/staff.lua.

Page generated on Sat Feb 07, 2015 at 18:38:28 by LDocGen.