def __init__(self, mpstate, name, description=None, public=False, multi_instance=False, multi_vehicle=False):
        '''
        Constructor

        if public is true other modules can find this module instance with module('name')
        '''
        self.mpstate = mpstate
        self.name = name
        self.needs_unloading = False
        self.multi_instance = multi_instance
        self.multi_vehicle = multi_vehicle

        if description is None:
            self.description = name + " handling"
        else:
            self.description = description
        if multi_instance:
            if not name in mpstate.multi_instance:
                mpstate.multi_instance[name] = []
                mpstate.instance_count[name] = 0
            mpstate.multi_instance[name].append(self)
            mpstate.instance_count[name] += 1
            self.instance = mpstate.instance_count[name]
            if self.instance > 1:
                # make the name distincitive, so self.module('map2') works
                self.name += str(self.instance)
        if public:
            mpstate.public_modules[self.name] = self
def __init__ ( self , mpstate , name , description = None , public = False , multi_instance = False , multi_vehicle = False ) : self . mpstate = mpstate self . name = name self . needs_unloading = False self . multi_instance = multi_instance self . multi_vehicle = multi_vehicle if description is None : self . description = name + " handling" else : self . description = description if multi_instance : if not name in mpstate . multi_instance : mpstate . multi_instance [ name ] = [ ] mpstate . instance_count [ name ] = 0 mpstate . multi_instance [ name ] . append ( self ) mpstate . instance_count [ name ] += 1 self . instance = mpstate . instance_count [ name ] if self . instance > 1 : self . name += str ( self . instance ) if public : mpstate . public_modules [ self . name ] = self
Constructor

        if public is true other modules can find this module instance with module('name')