Example #1
0
    def createToolTipContent(self, event, contentID):
        _logger.debug('BuyModule::createToolTipContent')
        if contentID == R.views.lobby.research.InsufficientCreditsTooltip():
            missingAmount = event.getArgument('missingAmount')
            model = InsufficientCreditsTooltipModel()
            model.setMissingAmount(missingAmount)
            return ViewImpl(ViewSettings(contentID, model=model))
        if contentID == R.views.lobby.research.SoldModuleInfoTooltip():
            model = SoldModuleInfoTooltipModel()
            array = model.getCompatibleTanks()
            compatibleVehicles = set(
                g_paramsCache.getComponentVehiclesNames(
                    self._previousModule.descriptor.compactDescr))
            _logger.debug('[BuyModuleView] Compatible vehicles: %s',
                          compatibleVehicles)
            array.reserve(len(compatibleVehicles))
            for name in compatibleVehicles:
                array.addString(name)

            return ViewImpl(ViewSettings(contentID, model=model))
        return super(BuyModuleDialogView,
                     self).createToolTipContent(event=event,
                                                contentID=contentID)
Example #2
0
 def compatibles(self):
     allVehiclesNames = set(g_paramsCache.getComponentVehiclesNames(self._itemDescr['compactDescr']))
     clipVehiclesNames = set(self.precachedParams.clipVehiclesNames)
     return allVehiclesNames.difference(clipVehiclesNames)
Example #3
0
 def compatibles(self):
     return g_paramsCache.getComponentVehiclesNames(self._itemDescr['compactDescr'])
 def compatibles(self):
     allVehiclesNames = set(g_paramsCache.getComponentVehiclesNames(self._itemDescr.compactDescr))
     clipVehiclesNames = set(self._getPrecachedInfo().clipVehiclesNames)
     return allVehiclesNames.difference(clipVehiclesNames)
 def compatibles(self):
     return g_paramsCache.getComponentVehiclesNames(self._itemDescr.compactDescr)
Example #6
0
 def compatibles(self):
     allVehiclesNames = set(
         g_paramsCache.getComponentVehiclesNames(
             self._itemDescr['compactDescr']))
     clipVehiclesNames = set(self.precachedParams.clipVehiclesNames)
     return allVehiclesNames.difference(clipVehiclesNames)