CorsixTH Lua Documentation

Room Class

Declared on: line 23 of Lua/room.lua.
Subclasses: BloodMachineRoom, CardiogramRoom, DNAFixerRoom, DecontaminationRoom, ElectrolysisRoom, FractureRoom, GPRoom, GeneralDiagRoom, HairRestorationRoom, InflationRoom, JellyVatRoom, OperatingTheatreRoom, PharmacyRoom, PsychRoom, ResearchRoom, ScannerRoom, SlackTongueRoom, StaffRoom, ToiletRoom, TrainingRoom, UltrascanRoom, WardRoom, XRayRoom

Method Index

Member Index

function Room:Room(x, y, w, h, id, room_info, world, hospital, door, door2)

Parameters:

NameTypeDescription
x ? ?
y ? ?
w ? ?
h ? ?
id ? ?
room_info ? ?
world ? ?
hospital ? ?
door ? ?
door2 ? ?

Declared on: line 25 of Lua/room.lua.

function Room:afterLoad(old, new)

Stub to be extended in subclasses, if needed.

Parameters:

NameTypeDescription
old ? ?
new ? ?

Declared on: line 835 of Lua/room.lua.

function Room:canHumanoidEnter(humanoid)

Parameters:

NameTypeDescription
humanoid ? ?

Declared on: line 596 of Lua/room.lua.

function Room:commandEnteringPatient(humanoid)

Parameters:

NameTypeDescription
humanoid ? ?

Declared on: line 454 of Lua/room.lua.

function Room:commandEnteringStaff(humanoid, already_initialized)

When a valid member of staff enters the room this function is called. Can be extended in derived classes.

Parameters:

NameTypeDescription
humanoid ? The staff in question
already_initialized ? If true, this means that the staff has already got order what to do.

Declared on: line 435 of Lua/room.lua.

function Room:createDealtWithPatientCallback(humanoid)

Parameters:

NameTypeDescription
humanoid ? ?

Declared on: line 374 of Lua/room.lua.

function Room:createEnterAction(humanoid_entering, callback)

Parameters:

NameTypeDescription
humanoid_entering ? ?
callback ? ?

Declared on: line 90 of Lua/room.lua.

function Room:dealtWithPatient(patient)

Parameters:

NameTypeDescription
patient ? ?

Declared on: line 142 of Lua/room.lua.

function Room:findWorkForStaff()

Checks if the room still needs the staff in it and otherwise sends them away if they're needed somewhere else.

Declared on: line 189 of Lua/room.lua.

function Room:getEntranceXY(inside)

Parameters:

NameTypeDescription
inside ? ?

Declared on: line 66 of Lua/room.lua.

function Room:getMissingStaff(criteria)

Given any type of staff criteria (required/maximum), subtract the staff in the room and return the result

Parameters:

NameTypeDescription
criteria ? ?

Declared on: line 207 of Lua/room.lua.

function Room:getStaffMember()

Returns the current staff member. Can be overriden in rooms with multiples staff members to return the desired one.

Declared on: line 396 of Lua/room.lua.

function Room:getUsageScore()

how many tiles further are we willing to walk if the room has all the required staff

Declared on: line 581 of Lua/room.lua.

function Room:initRoom(x, y, w, h, door, door2)

Parameters:

NameTypeDescription
x ? ?
y ? ?
w ? ?
h ? ?
door ? ?
door2 ? ?

Declared on: line 34 of Lua/room.lua.

function Room:isWaitingToGetStaff(staff)

Tests whether this room is awaiting more staff to be able to do business

Parameters:

NameTypeDescription
staff ? ?

Declared on: line 426 of Lua/room.lua.

function Room:makeHumanoidLeave(patient)

Tells a humanoid in the room to leave it. This can be overridden for special handling, e.g. if the humanoid needs to change before leaving the room.

Parameters:

NameTypeDescription
patient ? ?

Declared on: line 785 of Lua/room.lua.

function Room:onHumanoidEnter(humanoid)

Parameters:

NameTypeDescription
humanoid ? ?

Declared on: line 268 of Lua/room.lua.

function Room:onHumanoidLeave(humanoid)

Parameters:

NameTypeDescription
humanoid ? ?

Declared on: line 496 of Lua/room.lua.

function Room:roomFinished()

Function stub for rooms to implement. Called when the final confirm button has been pressed when building/editing a room.

Declared on: line 614 of Lua/room.lua.

function Room:setStaffMember(staff)

Parameters:

NameTypeDescription
staff ? ?

Declared on: line 401 of Lua/room.lua.

function Room:setStaffMembersAttribute(attribute, value)

function that sets a given attribute to a given value for all staff members. Should be overriden for rooms that have more than one staff member.

Parameters:

NameTypeDescription
attribute ? ?
value ? ?

Declared on: line 134 of Lua/room.lua.

function Room:shouldHavePatientReenter(patient)

Parameters:

NameTypeDescription
patient ? ?

Declared on: line 576 of Lua/room.lua.

function Room:staffFitsInRoom(staff)

Returns false if the room is already full of staff or if the given member of staff cannot help out. Otherwise returns true.

Parameters:

NameTypeDescription
staff ? ?

Declared on: line 405 of Lua/room.lua.

function Room:staffMeetsRoomRequirements(humanoid)

Returns true if the humanoid meets (one of) the required staff criteria of the room

Parameters:

NameTypeDescription
humanoid ? ?

Declared on: line 415 of Lua/room.lua.

function Room:testStaffCriteria(criteria, extra_humanoid)

Parameters:

NameTypeDescription
criteria ? ?
extra_humanoid ? ?

Declared on: line 224 of Lua/room.lua.

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