Пример #1
0
 def setRecord(self, result, reusable):
     player = result.player
     avatar = reusable.avatars.getAvatarInfo(player.dbID)
     noPenalties = not avatar.hasPenalties()
     self.suffixBadgeIcon = None
     self.suffixBadgeStripIcon = None
     if avatar is not None:
         self.hasSelectedBadge = avatar.badge > 0
         if self.hasSelectedBadge:
             self._setBadge(result, reusable)
         if avatar.suffixBadge:
             self.suffixBadgeIcon = style.makeBadgeIcon(avatar.suffixBadge)
             stripImg = R.images.gui.maps.icons.library.badges.strips.c_64x24.dyn(
                 'strip_{}'.format(avatar.suffixBadge))
             self.suffixBadgeStripIcon = backport.image(
                 stripImg()) if stripImg else ''
     self._processVehicles(result)
     self._setPlayerInfo(player)
     self._setTotalStats(result, noPenalties)
     self._setVehiclesStats(result, reusable)
     if not self.isPersonal or noPenalties:
         self._setAchievements(result, reusable)
     if not self._isObserver:
         self._setVehicleState(result, reusable)
     return
 def setRecord(self, result, reusable):
     player = result.player
     avatar = reusable.avatars.getAvatarInfo(player.dbID)
     noPenalties = not avatar.hasPenalties()
     self.badge = avatar.badge
     if self.badge > 0:
         self.badgeIcon = style.makeBadgeIcon(self.badge)
     else:
         self.badgeIcon = None
     self._processVehicles(result)
     self._setPlayerInfo(player)
     self._setTotalStats(result, noPenalties)
     self._setVehiclesStats(result, reusable)
     if not self.isPersonal or noPenalties:
         self._setAchievements(result, reusable)
     if not self._isObserver:
         self._setVehicleState(result, reusable)
     return
Пример #3
0
 def setRecord(self, result, reusable):
     """Sets record of battle results to fetch required data.
     :param result: instance of VehicleDetailedInfo or VehicleSummarizeInfo
     :param reusable: instance of _ReusableInfo.
     """
     player = result.player
     avatar = reusable.avatars.getAvatarInfo(player.dbID)
     noPenalties = not avatar.hasPenalties()
     self.badge = avatar.badge
     if self.badge > 0:
         self.badgeIcon = style.makeBadgeIcon(self.badge)
     else:
         self.badgeIcon = None
     self._setVehicleInfo(result.vehicle)
     self._setPlayerInfo(player)
     self._setTotalStats(result, noPenalties)
     self._setVehiclesStats(result)
     if not self.isPersonal or noPenalties:
         self._setAchievements(result, reusable)
     if not self._isObserver:
         self._setVehicleState(result, reusable)
     return
Пример #4
0
 def new_RVSB_setRecord(base, self, result, reusable):
     base(self, result, reusable)
     if result.player.dbID in g_badges:
         self.badge = g_badges[result.player.dbID]['lobby']
         self.badgeIcon = style.makeBadgeIcon(self.badge)