def setRecord(self, result, reusable): info = reusable.getPersonalVehiclesInfo(result) value = info.kills self.kills = numbers.formatInt(value, _UNDEFINED_EFFICIENCY_VALUE) self.killsTooltip = self.__makeEfficiencyHeaderTooltip( 'summKill', value) value = info.damageDealt self.damageDealt = numbers.makeStringWithThousandSymbol(value) self.damageDealtTooltip = self.__makeEfficiencyHeaderTooltip( 'summDamage', value) value = info.critsCount self.criticalDamages = numbers.formatInt(value, _UNDEFINED_EFFICIENCY_VALUE) self.criticalDamagesTooltip = self.__makeEfficiencyHeaderTooltip( 'summCrits', value) value = info.damageBlockedByArmor self.damageBlockedByArmor = numbers.makeStringWithThousandSymbol(value) self.damageBlockedTooltip = self.__makeEfficiencyHeaderTooltip( 'summArmor', value) value = info.damageAssisted self.damageAssisted = numbers.makeStringWithThousandSymbol(value) self.damageAssistedTooltip = self.__makeEfficiencyHeaderTooltip( 'summAssist', value) value = info.damageAssistedStun self.damageAssistedStun = numbers.makeStringWithThousandSymbol(value) self.damageAssistedStunTooltip = self.__makeEfficiencyHeaderTooltip( 'summStun', value) value = info.spotted self.spotted = numbers.formatInt(value, _UNDEFINED_EFFICIENCY_VALUE) self.spottedTooltip = self.__makeEfficiencyHeaderTooltip( 'summSpotted', value)
def setRecord(self, result, reusable): info = reusable.getPersonalVehiclesInfo(result) if info is None: from debug_utils import LOG_ERROR LOG_ERROR('ERROR: TotalEfficiencyDetailsHeader:setRecord: getPersonalVehiclesInfo returned NONE!') return else: value = info.kills self.kills = numbers.formatInt(value, _UNDEFINED_EFFICIENCY_VALUE) self.killsTooltip = self.__makeEfficiencyHeaderTooltip('summKill', value) value = info.damageDealt self.damageDealt = numbers.makeStringWithThousandSymbol(value) self.damageDealtTooltip = self.__makeEfficiencyHeaderTooltip('summDamage', value) value = info.critsCount self.criticalDamages = numbers.formatInt(value, _UNDEFINED_EFFICIENCY_VALUE) self.criticalDamagesTooltip = self.__makeEfficiencyHeaderTooltip('summCrits', value) value = info.damageBlockedByArmor self.damageBlockedByArmor = numbers.makeStringWithThousandSymbol(value) self.damageBlockedTooltip = self.__makeEfficiencyHeaderTooltip('summArmor', value) value = info.damageAssisted self.damageAssisted = numbers.makeStringWithThousandSymbol(value) self.damageAssistedTooltip = self.__makeEfficiencyHeaderTooltip('summAssist', value) value = info.damageAssistedStun self.damageAssistedStun = numbers.makeStringWithThousandSymbol(value) self.damageAssistedStunTooltip = self.__makeEfficiencyHeaderTooltip('summStun', value) value = info.spotted self.spotted = numbers.formatInt(value, _UNDEFINED_EFFICIENCY_VALUE) self.spottedTooltip = self.__makeEfficiencyHeaderTooltip('summSpotted', value) self.hasEfficencyStats = info.kills + info.damageDealt + info.critsCount + info.critsCount + info.damageBlockedByArmor + info.damageAssisted + info.damageAssistedStun + info.spotted > 0 return