CorsixTH Lua Documentation

CallsDispatcher Class

Declared on: line 21 of Lua/calls_dispatcher.lua.

Method Index

Member Index

function CallsDispatcher:CallsDispatcher(world, entities)

Turn on for debug message

Parameters:

NameTypeDescription
world ? ?
entities ? ?

Declared on: line 23 of Lua/calls_dispatcher.lua.

function CallsDispatcher.actionInterruptHandler(action, humanoid)

Default checkpoint interrupt handler Reset the assigned status, and find an replacement staff

Parameters:

NameTypeDescription
action ? ?
humanoid ? ?

Declared on: line 310 of Lua/calls_dispatcher.lua.
Note: Is a function rather than a method.

function CallsDispatcher:addChangeCallback(callback, self_value)

Parameters:

NameTypeDescription
callback ? ?
self_value ? ?

Declared on: line 36 of Lua/calls_dispatcher.lua.

function CallsDispatcher:answerCall(staff)

Find the best call for a staff to work on. When a staff goes to meandering mode, it should call this function to look for new call Return true if a call is answered. False if there is no suitable call waiting and the staff is really free.

Parameters:

NameTypeDescription
staff ? ?

Declared on: line 222 of Lua/calls_dispatcher.lua.

function CallsDispatcher:callForRepair(object, urgent, manual, lock_room)

Call for repair

Parameters:

NameTypeDescription
object ? ?
urgent ? Announcement should be made
manual ? This call should not trigger advisor for "your machine is failing"
lock_room ? This is a minor maintence. Rooms needed not to be locked. If urgent or manual is specified, lock_room will be true automatically

Declared on: line 87 of Lua/calls_dispatcher.lua.

function CallsDispatcher:callForStaff(room)

Parameters:

NameTypeDescription
room ? ?

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

function CallsDispatcher:callForStaffEachRoom(room, attribute, key)

Parameters:

NameTypeDescription
room ? ?
attribute ? ?
key ? ?

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

function CallsDispatcher:callForWatering(plant)

Parameters:

NameTypeDescription
plant ? ?

Declared on: line 136 of Lua/calls_dispatcher.lua.

function CallsDispatcher:dropFromQueue(object, key)

Drop any call associated with the object (and/or key). Expected to be called when the call is no longer needed (like a machine that needed repaired were replaced), or when the object is destroyed, etc.

Parameters:

NameTypeDescription
object ? ?
key ? ?

Declared on: line 340 of Lua/calls_dispatcher.lua.

function CallsDispatcher:dump()

Dump the current call table for debugging

Declared on: line 269 of Lua/calls_dispatcher.lua.

function CallsDispatcher.dumpCall(call, message)

Parameters:

NameTypeDescription
call ? ?
message ? ?

Declared on: line 280 of Lua/calls_dispatcher.lua.
Note: Is a function rather than a method.

function CallsDispatcher:enqueue(object, key, description, verification, priority, execute)

Enqueue the call returns: True if the call is inserted and queued, but not served False if the call is served right away, or has been queued and assigned

Parameters:

NameTypeDescription
object ? ?
key ? ?
description ? ?
verification ? ?
priority ? ?
execute ? ?

Declared on: line 158 of Lua/calls_dispatcher.lua.

function CallsDispatcher:executeCall(call, staff)

Parameters:

NameTypeDescription
call ? ?
staff ? ?

Declared on: line 330 of Lua/calls_dispatcher.lua.

function CallsDispatcher:findSuitableStaff(call)

Find suitable (best) staff for working on a specific call True

Parameters:

NameTypeDescription
call ? ?

Declared on: line 184 of Lua/calls_dispatcher.lua.

function CallsDispatcher.getPriorityForRoom(room, attribute, staff)

Parameters:

NameTypeDescription
room ? ?
attribute ? ?
staff ? ?

Declared on: line 388 of Lua/calls_dispatcher.lua.
Note: Is a function rather than a method.

function CallsDispatcher.onCheckpointCompleted(call)

Called when a call is completed sucessfully

Parameters:

NameTypeDescription
call ? ?

Declared on: line 320 of Lua/calls_dispatcher.lua.
Note: Is a function rather than a method.

function CallsDispatcher.queueCallCheckpointAction(humanoid, interrupt_handler)

Add checkpoint action All call execution method should add this action in apporiate place to signify the job is finished. A interrupt handler could be supplied if special handling is needed. If not, the default would be reinsert the call into the queue

Parameters:

NameTypeDescription
humanoid ? ?
interrupt_handler ? ?

Declared on: line 297 of Lua/calls_dispatcher.lua.
Note: Is a function rather than a method.

function CallsDispatcher:removeChangeCallback(callback)

Parameters:

NameTypeDescription
callback ? ?

Declared on: line 40 of Lua/calls_dispatcher.lua.

function CallsDispatcher.sendStaffToRepair(object, handyman)

Parameters:

NameTypeDescription
object ? ?
handyman ? ?

Declared on: line 441 of Lua/calls_dispatcher.lua.
Note: Is a function rather than a method.

function CallsDispatcher.sendStaffToRoom(room, staff)

Parameters:

NameTypeDescription
room ? ?
staff ? ?

Declared on: line 419 of Lua/calls_dispatcher.lua.
Note: Is a function rather than a method.

function CallsDispatcher.sendStaffToWatering(plant, handyman)

Parameters:

NameTypeDescription
plant ? ?
handyman ? ?

Declared on: line 445 of Lua/calls_dispatcher.lua.
Note: Is a function rather than a method.

function CallsDispatcher.staffActionInterruptHandler(action, humanoid, high_priority)

Parameters:

NameTypeDescription
action ? ?
humanoid ? ?
high_priority ? ?

Declared on: line 431 of Lua/calls_dispatcher.lua.
Note: Is a function rather than a method.

function CallsDispatcher.unassignCall(call)

Parameters:

NameTypeDescription
call ? ?

Declared on: line 368 of Lua/calls_dispatcher.lua.
Note: Is a function rather than a method.

function CallsDispatcher.verifyStaffForRoom(room, attribute, staff)

Parameters:

NameTypeDescription
room ? ?
attribute ? ?
staff ? ?

Declared on: line 376 of Lua/calls_dispatcher.lua.
Note: Is a function rather than a method.

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