CorsixTH Lua Documentation

Queue Class

Manages a list of `Humanoid`s which are waiting to use an `Object`.

Declared on: line 21 of Lua/queue.lua.
Full description:
A queue stores a list of humanoids waiting to use an object. For a reception desk, this is as expected. For a room, the queue is for the door, not the room. Hence the queue stores the list of patients waiting to enter (the traditional queue for the room), the list of staff waiting to enter (because of the door being in use for example), the list of staff and patients waiting to leave (again due to door being in use). Queues are currently implemented as normal Lua arrays, but you should access a queue via its methods rather than directly.

Method Index

Member Index

function Queue:decreaseMaxSize(amount)

Parameters:

NameTypeDescription
amount ? ?

Declared on: line 57 of Lua/queue.lua.

function Queue:expect(humanoid)

Parameters:

NameTypeDescription
humanoid ? ?

Declared on: line 43 of Lua/queue.lua.

function Queue:increaseMaxSize(amount)

Parameters:

NameTypeDescription
amount ? ?

Declared on: line 61 of Lua/queue.lua.

function Queue:move(index, new_index)

Parameters:

NameTypeDescription
index ? ?
new_index ? ?

Declared on: line 230 of Lua/queue.lua.

function Queue:patientSize()

Returns how many patients are queued or expected

Declared on: line 104 of Lua/queue.lua.

function Queue:push(humanoid, callbacks_on)

Parameters:

NameTypeDescription
humanoid ? ?
callbacks_on ? ?

Declared on: line 118 of Lua/queue.lua.

function Queue:remove(index)

Parameters:

NameTypeDescription
index ? ?

Declared on: line 200 of Lua/queue.lua.

function Queue:removeValue(value)

Parameters:

NameTypeDescription
value ? ?

Declared on: line 220 of Lua/queue.lua.

function Queue:reportedHumanoid(index)

Parameters:

NameTypeDescription
index ? ?

Declared on: line 110 of Lua/queue.lua.

function Queue:rerouteAllPatients(action)

Called when reception desk is destroyed. May be extended later to handle removed rooms, too. Update: Now also used when a room is destroyed from a crashed machine.

Parameters:

NameTypeDescription
action ? ?

Declared on: line 250 of Lua/queue.lua.

function Queue:setBenchThreshold(standing_count)

Parameters:

NameTypeDescription
standing_count ? ?

Declared on: line 65 of Lua/queue.lua.

function Queue:setMaxQueue(queue_count)

Parameters:

NameTypeDescription
queue_count ? ?

Declared on: line 69 of Lua/queue.lua.

function Queue:setPriorityForSameRoom(entity)

Parameters:

NameTypeDescription
entity ? ?

Declared on: line 114 of Lua/queue.lua.

function Queue:unexpect(humanoid)

Parameters:

NameTypeDescription
humanoid ? ?

Declared on: line 50 of Lua/queue.lua.

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