def __setSeasonData(self, forceAnim=False): seasonRenderersList = [] filledSeasonSlots = 0 for season in SEASONS_ORDER: seasonName = SEASON_TYPE_TO_NAME.get(season) if self.__ctx.mode == C11nMode.CUSTOM: isFilled = self.__ctx.checkSlotsFillingForSeason(season) else: isFilled = self.__ctx.modifiedStyle is not None filledSeasonSlots += int(isFilled) seasonRenderersList.append({ 'nameText': VEHICLE_CUSTOMIZATION.getSeasonName(seasonName), 'nameSelectedText': VEHICLE_CUSTOMIZATION.getSeasonSelectedName(seasonName), 'seasonImageSrc': RES_ICONS.getSeasonImage(seasonName), 'seasonBGImageSrc': RES_ICONS.getSeasonBGImage(seasonName), 'seasonShineImageSrc': RES_ICONS.getSeasonShineImage(seasonName), 'isFilled': isFilled, 'forceAnim': forceAnim, 'tooltip': makeTooltip( body=VEHICLE_CUSTOMIZATION.getSheetSeasonName(seasonName)) }) self.as_setSeasonsBarDataS(seasonRenderersList) self._seasonSoundAnimantion.setFilledSeasonSlots( filledSeasonSlots, forceAnim) return
def __makeStyleRendererVO(self): seasonItemData = [] allUnique = set() if self._currentStyle: smallRenderers = True for season in SEASONS_ORDER: seasonName = SEASON_TYPE_TO_NAME.get(season) seasonUnique = set() outfit = self._currentStyle.getOutfit(season) items = [] for item, component in outfit.itemsFull(): if item.intCD not in seasonUnique and not item.isHiddenInUI( ): items.append({ 'image': item.getIconApplied(component), 'specialArgs': item.getSpecialArgs(component), 'isWide': item.isWide(), 'intCD': item.intCD }) allUnique.add(item.intCD) seasonUnique.add(item.intCD) if len(items) > 1 and smallRenderers: smallRenderers = False titleText = VEHICLE_CUSTOMIZATION.getSheetSeasonName( seasonName) seasonItemData.append({ 'titleText': text_styles.standard(titleText), 'itemRendererVOs': items, 'rendererLnk': CUSTOMIZATION_ALIASES.CUSTOMIZATION_SHEET_STYLE_RENDERER_UI }) for item in seasonItemData: item['isSmall'] = smallRenderers return seasonItemData
def __makeSetOnOtherSeasonsRendererVO(self): activeSeason = SEASON_TYPE_TO_NAME.get(self.__ctx.currentSeason) actionBtnLabel = VEHICLE_CUSTOMIZATION.PROPERTYSHEET_ACTIONBTN_APPLYTOALLMAPS actionBtnIconSrc = '' if self._isItemAppliedToAll: actionBtnLabel = VEHICLE_CUSTOMIZATION.PROPERTYSHEET_ACTIONBTN_REMOVE_SEASONS actionBtnIconSrc = RES_ICONS.MAPS_ICONS_LIBRARY_ASSET_1 titleText = text_styles.neutral( VEHICLE_CUSTOMIZATION.PROPERTYSHEET_TITLE_ALLMAPS) extraPriceCurrency = '' extraPriceText = '' if self._extraMoney: extraPriceCurrency = self._extraMoney.getCurrency() if self._extraMoney.get(extraPriceCurrency): extraPriceText = '{}{}'.format( currency.getStyle(extraPriceCurrency)('+'), currency.applyAll( extraPriceCurrency, self._extraMoney.get(extraPriceCurrency))) else: titleText = text_styles.standard( _ms(VEHICLE_CUSTOMIZATION.PROPERTYSHEET_TITLE_APPLIEDTOMAP, mapType=text_styles.neutral( VEHICLE_CUSTOMIZATION.getSheetSeasonName( activeSeason)))) extraPriceText = '' extraPriceCurrency = '' return { 'titleText': titleText, 'iconSrc': RES_ICONS.getSeasonIcon(activeSeason), 'actionBtnLabel': actionBtnLabel, 'actionBtnIconSrc': actionBtnIconSrc, 'isAppliedToAll': self._isItemAppliedToAll, 'actionType': CUSTOMIZATION_ALIASES. CUSTOMIZATION_SHEET_ACTION_APPLY_TO_ALL_SEASONS, 'rendererLnk': CUSTOMIZATION_ALIASES.CUSTOMIZATION_SHEET_BTN_RENDERER_UI, 'extraPriceText': extraPriceText, 'extraPriceIcon': extraPriceCurrency }