MachineManager (version 1.4)
index
d:\cruisecontrol\game-client-system\game\scripts\machinemanager.py

 
Classes
       
Machine
TestMachine

 
class Machine
    Has many machine modules and is controlled by an Controller
 
  Methods defined here:
__init__(self)
addDevice(self, name, device)
Add a machine device to the device collection that makes this machine.
Currently support 'vehicle'
Future support includes
- sensors
- range
- pose
- target (for gravity gun, ....)
callback(self, source, event, arguments)
getBase(self)
getDevice(self, deviceName)
getDevices(self)
getSize(self)
hasDevice(self, deviceName)
Returns True or False.
setControl(self, c)
Sets the controller of this machine. The controler must be of class Controller and 
can have different handling dependent on implementation:
- user controlled
- ai controller
- network controlled
If c is None the machine control will be disabled. If a controller is defined we
will desable that old contoller and set the new one.

Data and other attributes defined here:
control = None
devices = {}
id = ''
name = ''
parts = {}

 
class TestMachine
     Methods defined here:
testSetControl(self)

 
Functions
       
add(name, machine, nicename=None)
Will append the machine into the collection
get(name)
Will return machine by name. If name does not 
exist we will return None
getMachines()
Returns a dictionary of all the machines with name data relationship.

 
Data
        __author__ = 'Kjartan A Jonsson'
__copyright__ = 'Copyright (c) 2007 aGameCompany'
__license__ = 'aGameCompany'
__version__ = '$Revision: 1.4 $'

 
Author
        Kjartan A Jonsson