def __getModuleInfo(self, intCD, icon, index): module = self.__getModuleItem(intCD) return {'header': getTreeModuleHeader(module), 'parameters': getShortListParameters(module, self.__getProgressionVehicle(), self.__getInstalledOnVehicleAnalogByIntCD(intCD)), 'hotKeys': getHotKeyListByIndex(index), 'module': {'icon': icon, 'intCD': intCD, 'available': True}}
def __getModuleInfo(self, moduleItem, index): moduleInfo = {'header': getTreeModuleHeader(moduleItem), 'parameters': getShortListParameters(moduleItem, self._getVehicle()), 'module': {'icon': getTreeModuleIcon(moduleItem), 'intCD': moduleItem.intCD, 'available': True}} if not self.__textInited: moduleInfo['hotKeys'] = br_helpers.getHotKeyListByIndex(index) return moduleInfo
def __getModuleInfoPanel(self, intCD): itemTypeID, _, _ = parseIntCompactDescr(intCD) if itemTypeID != GUI_ITEM_TYPE.VEHICLE: module = self.__getModuleItem(intCD) if module is not None: return {'header': getTreeModuleHeader(module), 'parameters': getShortListParameters(module, self.__getProgressionVehicle(), self.__getInstalledOnVehicleAnalogByIntCD(intCD)), 'module': {'icon': getTreeModuleIcon(module), 'available': True}} return
def __constructModule(cls, module): block = [] moduleDescr = module.descriptor icon = getTreeModuleIcon(module) if icon: block.append( formatters.packAtlasIconTextBlockData( title=text_styles.highTitle(getTreeModuleHeader(module)), desc=text_styles.standard(moduleDescr.userString), atlas=ATLAS_CONSTANTS.COMMON_BATTLE_LOBBY, icon=icon, iconPadding=formatters.packPadding(right=12), txtGap=1, txtPadding=formatters.packPadding(top=7))) return block
def setVehicleChangeResponse(self, itemCD, success): if success: progressionCtrl = self.__getProgressionCtrl() item = progressionCtrl.getModule(itemCD) if isItemVehicleHull(itemCD, self._getVehicle()): moduleKey = R.strings.battle_royale.player_messages.moduleType.hull else: moduleKey = R.strings.battle_royale.player_messages.moduleType.dyn( item.itemTypeName, None) self.__sessionProvider.shared.messages.onShowPlayerMessageByKey( 'VEHICLE_UPGRADE', { 'module': getTreeModuleHeader(item), 'moduleType': backport.text(moduleKey()) if moduleKey else '' }) self.__playEffect(True) return