Example #1
0
 def _getStatisticsBlock(self):
     event = self._event
     method = event.getMethod()
     op = event.getObjectiveParameter()
     order = list(filter(lambda t: op not in t, self._ParameterOrder))
     info = self._excelItem.getInfo()
     param1 = order[0][0]
     statistic1 = EVENT_BOARDS.summary_param_all(method, param1)
     statistic1Value = str(_getParameterValue(param1, info))
     statistic1Icon = _ICON_BY_PARAMETER[param1]
     param2 = order[1][0]
     statistic2 = EVENT_BOARDS.summary_param_all(method, param2)
     statistic2Value = str(_getParameterValue(param2, info))
     statistic2Icon = _ICON_BY_PARAMETER[param2]
     return {
         'statistic1Value':
         statistic1Value,
         'statistic1':
         statistic1,
         'statistic1Icon':
         statistic1Icon,
         'statistic1Tooltip':
         makeTooltip(
             TOOLTIPS.elen_summary_param_all_all_header(method, param1),
             TOOLTIPS.elen_summary_param_all_all_body(method, param1)),
         'statistic2Value':
         statistic2Value,
         'statistic2':
         statistic2,
         'statistic2Icon':
         statistic2Icon,
         'statistic2Tooltip':
         makeTooltip(
             TOOLTIPS.elen_summary_param_all_all_header(method, param2),
             TOOLTIPS.elen_summary_param_all_all_body(method, param2)),
         'statistic3Value':
         str(info.getBlockedDamage()),
         'statistic3':
         EVENT_BOARDS.SUMMARY_DAMAGEBLOCKED,
         'statistic3Icon':
         RES_ICONS.MAPS_ICONS_EVENTBOARDS_POPUPICONS_BLOCKED_DMG_POPUP,
         'statistic3Tooltip':
         makeTooltip(TOOLTIPS.ELEN_SUMMARY_ADDPARAM_DAMAGEBLOCKED_HEADER,
                     TOOLTIPS.ELEN_SUMMARY_ADDPARAM_DAMAGEBLOCKED_BODY),
         'statistic4Value':
         str(info.getFrags()),
         'statistic4':
         _ms(EVENT_BOARDS.SUMMARY_DESTROYEDVEHICLES),
         'statistic4Icon':
         RES_ICONS.MAPS_ICONS_EVENTBOARDS_POPUPICONS_VEHICLE_POPUP,
         'statistic4Tooltip':
         makeTooltip(TOOLTIPS.ELEN_SUMMARY_ADDPARAM_FRAGS_HEADER,
                     TOOLTIPS.ELEN_SUMMARY_ADDPARAM_FRAGS_BODY)
     }
Example #2
0
 def getExperienceBlock(self):
     event = self._event
     eventType = self._event.getType()
     method = event.getMethod()
     op = event.getObjectiveParameter()
     opName = EVENT_BOARDS.summary_param_all(method, op)
     opValue = self._excelItem.getP1()
     rank = self._excelItem.getRank()
     battles = self._excelItem.getP3()
     battleIcon = self._iconByType[op]
     groupPos = self.__getRibbon()
     positionTooltip = makeTooltip(
         TOOLTIPS.elen_summary_rank(groupPos) if groupPos else TOOLTIPS.
         ELEN_SUMMARY_RANK_NORANK)
     battleTooltip = makeTooltip(
         TOOLTIPS.ELEN_SUMMARY_BATTLES_HEADER,
         TOOLTIPS.elen_summary_battles_all_body(eventType))
     experienceTooltip = makeTooltip(
         TOOLTIPS.elen_excel_objparam_all_all_header(method, op),
         TOOLTIPS.elen_excel_objparam_all_all_body(method, op))
     return {
         'experienceValue': str(opValue),
         'experience': opName,
         'position': _ms(EVENT_BOARDS.SUMMARY_POSITION, position=str(rank)),
         'battleValue': str(battles),
         'battle': _ms(EVENT_BOARDS.SUMMARY_BATTLES),
         'experienceIcon': battleIcon,
         'ribbon': groupPos,
         'battleIcon':
         RES_ICONS.MAPS_ICONS_EVENTBOARDS_POPUPICONS_BATTLE_POPUP,
         'experienceTooltip': experienceTooltip,
         'positionTooltip': positionTooltip,
         'battleTooltip': battleTooltip
     }