Ejemplo n.º 1
0
 def updateWeapons(self):
     if self.disabled:
         self.__updateTimer = None
         return
     
     weaponModules = findModules(groupNames=WeaponGroupNames)
     
     for moduleID, module in weaponModules.items():
         if hasattr(module, "ChangeAmmo"):
             self.ensureModuleHooked(module)
                     
         canActivate = canActivateModule(module)[0]
         canDeactivate = canDeactivateModule(module)[0]
         
         currentTarget = self.__activeModules.get(moduleID, None)
         if currentTarget:
             isActive = isModuleActive(module)
             if isActive == False:
                 del self.__activeModules[moduleID]
                 currentTarget = None                    
         
         if (
             ((currentTarget is not None) and canDeactivate) or
             canActivate
         ):
             uthread.pool("DoUpdateModule", self.doUpdateModule, moduleID, module, currentTarget)
Ejemplo n.º 2
0
    def updateWeapons(self):
        if self.disabled:
            self.__updateTimer = None
            return

        weaponModules = findModules(groupNames=WeaponGroupNames)

        for moduleID, module in weaponModules.items():
            if hasattr(module, "ChangeAmmo"):
                self.ensureModuleHooked(module)

            canActivate = canActivateModule(module)[0]
            canDeactivate = canDeactivateModule(module)[0]

            currentTarget = self.__activeModules.get(moduleID, None)
            if currentTarget:
                isActive = isModuleActive(module)
                if isActive == False:
                    del self.__activeModules[moduleID]
                    currentTarget = None

            if (((currentTarget is not None) and canDeactivate)
                    or canActivate):
                uthread.pool("DoUpdateModule", self.doUpdateModule, moduleID,
                             module, currentTarget)
Ejemplo n.º 3
0
 def updateModules(self):
     if self.disabled:
         self.__updateTimer = None
         return
     activeModules = findModules(groupNames=ModuleGroupNames)
     
     for moduleID, module in activeModules.items():
         if (canActivateModule(module) and (not isModuleActive(module))):
             activateModule(module)