Esempio n. 1
0
    def __setInitialSlotsData(self, iSlotsData):
        if not self.__processingPurchase:
            self.__animationStarted = False
        self.__initialSlotsData = iSlotsData
        oldBonusData = self.__bonusData
        self.__bonusData = {}
        for qTypeName in QUALIFIER_TYPE_NAMES.iterkeys():
            self.__bonusData[qTypeName] = {
                "bonusName": text_styles.main(_ms("#vehicle_customization:bonusName/{0}".format(qTypeName))),
                "bonusIcon": getBonusIcon42x42(qTypeName),
                "bonusTotalCount": 0,
                CUSTOMIZATION_TYPE.CAMOUFLAGE: [],
                CUSTOMIZATION_TYPE.EMBLEM: [],
                CUSTOMIZATION_TYPE.INSCRIPTION: [],
                "oldBonusTotalCount": 0,
                "bonusAppliedCount": 0,
                "oldBonusAppliedCount": 0,
                "bonusTotalDescriptionCount": 0,
                "bonusAppliedDescriptionCount": 0,
            }
            if oldBonusData:
                self.__bonusData[qTypeName]["oldBonusTotalCount"] = oldBonusData[qTypeName]["bonusTotalCount"]

        forEachSlotIn(iSlotsData, iSlotsData, self.__getInitialBonusData)
        self.__saveInitialTooltipData()
Esempio n. 2
0
    def __packCrewInfoData(self):
        crewData = []
        for idx, tankman in g_currentPreviewVehicle.item.crew:
            role = tankman.descriptor.role
            crewData.append({'icon': getBonusIcon42x42(role),
             'name': text_styles.middleTitle(ITEM_TYPES.tankman_roles(role)),
             'tooltip': TOOLTIPS_CONSTANTS.VEHICLE_PREVIEW_CREW_MEMBER,
             'role': role})

        return {'listDesc': text_styles.main(VEHICLE_PREVIEW.INFOPANEL_TAB_CREWINFO_LISTDESC_TEXT),
         'crewList': crewData,
         'showNationFlag': False}
    def __packCrewInfoData(self):
        crewData = []
        for idx, tankman in g_currentPreviewVehicle.item.crew:
            role = tankman.descriptor.role
            crewData.append({'icon': getBonusIcon42x42(role),
             'name': text_styles.middleTitle(ITEM_TYPES.tankman_roles(role)),
             'tooltip': TOOLTIPS_CONSTANTS.VEHICLE_PREVIEW_CREW_MEMBER,
             'role': role})

        return {'listDesc': text_styles.main(VEHICLE_PREVIEW.INFOPANEL_TAB_CREWINFO_LISTDESC_TEXT),
         'crewList': crewData,
         'showNationFlag': False}
Esempio n. 4
0
    def __setInitialSlotsData(self, iSlotsData):
        if not self.__processingPurchase:
            self.__animationStarted = False
        self.__initialSlotsData = iSlotsData
        oldBonusData = self.__bonusData
        self.__bonusData = {}
        for qTypeName in QUALIFIER_TYPE_NAMES.iterkeys():
            self.__bonusData[qTypeName] = {'bonusName': text_styles.main(_ms('#vehicle_customization:bonusName/{0}'.format(qTypeName))),
             'bonusIcon': getBonusIcon42x42(qTypeName),
             'bonusTotalCount': 0,
             CUSTOMIZATION_TYPE.CAMOUFLAGE: [],
             CUSTOMIZATION_TYPE.EMBLEM: [],
             CUSTOMIZATION_TYPE.INSCRIPTION: [],
             'oldBonusTotalCount': 0,
             'bonusAppliedCount': 0,
             'oldBonusAppliedCount': 0,
             'bonusTotalDescriptionCount': 0,
             'bonusAppliedDescriptionCount': 0}
            if oldBonusData:
                self.__bonusData[qTypeName]['oldBonusTotalCount'] = oldBonusData[qTypeName]['bonusTotalCount']

        forEachSlotIn(iSlotsData, iSlotsData, self.__getInitialBonusData)
        self.__saveInitialTooltipData()