def __getUpgradeItems(self): vehicle = self._getVehicle() if not vehicle: return currentLevel = self.__getCurrentLvl() nextVehicleLevel = currentLevel + 1 upgrades = [] upgradeCds = [] if vehicle.isAlive and self.__level > currentLevel: progressionCtrl = self.__getProgressionCtrl() for _, _, intCD, unlocks in vehicle.getUnlocksDescrs(): if intCD not in upgradeCds: item = self.__getModuleItem(intCD) itemLvl = item.level if itemLvl == nextVehicleLevel and progressionCtrl.mayInstallModule(item): if not br_helpers.isAdditionalModule(itemLvl, unlocks, self.__getModuleItem): upgrades.append(item) upgradeCds.append(intCD) return upgrades
def _canBeShown(self, intCD, level, unlocks): return not br_helpers.isAdditionalModule(level, unlocks, self._getItem)