def __init__(self, _): super(BattleRoyaleStatsComposer, self).__init__() self._block = base.StatsBlock(templates.BR_TOTAL_VO_META) self._block.addNextComponent(templates.BR_TABS_BLOCK.clone()) self._block.addNextComponent(templates.BR_TEAM_STATS_BLOCK.clone()) self._block.addNextComponent(templates.BR_COMMON_STATS_BLOCK.clone()) self._block.addNextComponent(templates.BR_PERSONAL_STATS_BLOCK.clone())
def setRecord(self, result, reusable): blocks = [] for bases, enemies in reusable.getPersonalDetailsIterator(result): components = [] for info in bases: if info.capturePoints > 0 or info.droppedCapturePoints > 0: components.append( style.GroupMiddleLabelBlock( BATTLE_RESULTS.COMMON_BATTLEEFFICIENCY_BASES)) component = EnemyTeamBaseDetailBlock() component.setRecord(info, reusable) components.append(component) component = AllyTeamBaseDetailBlock() component.setRecord(info, reusable) components.append(component) block = base.StatsBlock(base.ListMeta()) if enemies: block.addComponent( block.getNextComponentIndex(), style.GroupMiddleLabelBlock( BATTLE_RESULTS.COMMON_BATTLEEFFICIENCY_TECHNIQUE)) for info in enemies: component = EnemyDetailsBlock() component.setRecord(info, reusable) block.addComponent(block.getNextComponentIndex(), component) for component in components: block.addComponent(block.getNextComponentIndex(), component) blocks.append(block) for block in blocks[-1:] + blocks[:-1]: self.addComponent(self.getNextComponentIndex(), block)
def __init__(self, reusable): super(RankedBattlesStatsComposer, self).__init__(reusable, templates.RANKED_COMMON_STATS_BLOCK.clone(), templates.RANKED_PERSONAL_STATS_BLOCK.clone(), templates.RANKED_TEAMS_STATS_BLOCK.clone(), templates.REGULAR_TEXT_STATS_BLOCK.clone()) self.__resultsTeamsBlock = base.StatsBlock(templates.RANKED_RESULTS_BLOCK) self.__resultsTeamsBlock.addNextComponent(templates.RANKED_RESULTS_TEAMS_STATS_BLOCK.clone()) self.__resultsTeamsBlock.addNextComponent(templates.RANKED_ENABLE_ANIMATION_BLOCK.clone()) self.__resultsTeamsBlock.addNextComponent(templates.RANKED_SHOW_WIDGET_BLOCK.clone()) self.__resultsTeamsBlock.addNextComponent(templates.RANKED_RESULTS_STATUS_BLOCK.clone()) self.__resultsTeamsBlock.addNextComponent(templates.RANKED_RESULTS_STATE_BLOCK.clone())
def __init__(self, reusable, common, personal, teams, text, animation=None): super(StatsComposer, self).__init__() self._block = base.StatsBlock(templates.TOTAL_VO_META) self._registerTabs(reusable) self._block.addNextComponent(text) self._block.addNextComponent(templates.VEHICLE_PROGRESS_STATS_BLOCK.clone()) self._block.addNextComponent(templates.QUESTS_PROGRESS_STATS_BLOCK.clone()) self._block.addNextComponent(common) self._block.addNextComponent(personal) self._block.addNextComponent(teams) self._animation = animation
def __init__(self, reusable, common, personal, teams, text, animation = None): super(StatsComposer, self).__init__() self._block = base.StatsBlock(templates.TOTAL_VO_META) if reusable.common.isMultiTeamMode: self._block.addNextComponent(templates.MULTI_TEAM_TABS_BLOCK.clone()) else: self._block.addNextComponent(templates.REGULAR_TABS_BLOCK.clone()) self._block.addNextComponent(text) self._block.addNextComponent(templates.VEHICLE_PROGRESS_STATS_BLOCK.clone()) self._block.addNextComponent(templates.QUESTS_PROGRESS_STATS_BLOCK.clone()) self._block.addNextComponent(common) self._block.addNextComponent(personal) self._block.addNextComponent(teams) self._animation = animation
'viewId': 'TeamStatsUI', 'showWndBg': False}, {'label': i18n.makeString(MENU.FINALSTATISTIC_TABS_DETAILSSTATS), 'linkage': 'DetailsStatsViewUI', 'viewId': 'DetailsStatsViewUI', 'showWndBg': True}]) _MULTI_TEAM_TABS_VO_META = base.ListMeta([{'label': MENU.FINALSTATISTIC_TABS_COMMONSTATS, 'linkage': 'CommonStats', 'viewId': 'CommonStats', 'showWndBg': False}, {'label': MENU.FINALSTATISTIC_TABS_TEAMSTATS, 'linkage': 'MultiteamStatsUI', 'viewId': 'MultiteamStatsUI', 'showWndBg': False}, {'label': MENU.FINALSTATISTIC_TABS_DETAILSSTATS, 'linkage': 'DetailsStatsViewUI', 'viewId': 'DetailsStatsViewUI', 'showWndBg': True}]) REGULAR_TABS_BLOCK = base.StatsBlock(_REGULAR_TABS_VO_META, 'tabInfo') MULTI_TEAM_TABS_BLOCK = base.StatsBlock(_MULTI_TEAM_TABS_VO_META, 'tabInfo') _TEXT_VO_META = base.DictMeta({'windowTitle': i18n.makeString(MENU.FINALSTATISTIC_WINDOW_TITLE), 'shareButtonLabel': i18n.makeString(BATTLE_RESULTS.COMMON_RESULTSSHAREBTN), 'shareButtonTooltip': i18n.makeString(TOOLTIPS.BATTLERESULTS_FORTRESOURCE_RESULTSSHAREBTN), 'replayButtonLabel': i18n.makeString(BATTLE_RESULTS.REPLAYBTNLABEL), 'ownTitle': BATTLE_RESULTS.TEAM_STATS_OWNTEAM, 'enemyTitle': BATTLE_RESULTS.TEAM_STATS_ENEMYTEAM}) REGULAR_TEXT_STATS_BLOCK = base.StatsBlock(_TEXT_VO_META, 'textData') CLAN_TEXT_STATS_BLOCK = REGULAR_TEXT_STATS_BLOCK.clone() CLAN_TEXT_STATS_BLOCK.addComponent(0, common.AllyTeamClanTitle('ownTitle')) CLAN_TEXT_STATS_BLOCK.addComponent(1, common.EnemyTeamClanTitle('enemyTitle')) _COMMON_VO_META = base.DictMeta({'iconType': 'tank', 'sortDirection': 'descending', 'wasInBattle': True, 'arenaCreateTimeStr': '',
'playerVehicle': { 'name': '', 'typeIcon': '' }, 'credits': { 'value': 0, 'str': '0' }, 'xp': { 'value': 0, 'str': '0' } }) _BOOTCAMP_PLAYERVEHICLE_VO_META = base.DictMeta({'name': '', 'typeIcon': ''}) _BOOTCAMP_STATVALUE_VO_META = base.DictMeta({'value': 0, 'str': '0'}) BOOTCAMP_RESULTS_BLOCK = base.StatsBlock(_BOOTCAMP_VO_META, '') BOOTCAMP_RESULTS_BLOCK.addComponent(0, bootcamp.BackgroundItem('background')) BOOTCAMP_RESULTS_BLOCK.addComponent( 1, bootcamp.UnlocksAndMedalsBlock(base.ListMeta(), 'unlocksAndMedals')) BOOTCAMP_RESULTS_BLOCK.addComponent(2, bootcamp.HasUnlocksFlag('hasUnlocks')) BOOTCAMP_RESULTS_BLOCK.addComponent( 3, bootcamp.StatsBlock(base.ListMeta(), 'stats')) BOOTCAMP_RESULTS_BLOCK.addComponent( 4, bootcamp.ResultTypeStrItem('resultTypeStr')) BOOTCAMP_RESULTS_BLOCK.addComponent( 5, bootcamp.FinishReasonItem('finishReasonStr')) BOOTCAMP_RESULTS_BLOCK.addComponent(6, bootcamp.ShowRewardsFlag('showRewards')) BOOTCAMP_RESULTS_BLOCK.addComponent( 7, bootcamp.PlayerVehicleBlock(_BOOTCAMP_PLAYERVEHICLE_VO_META, 'playerVehicle'))
'personal': {}, 'common': {}, 'leaderboard': [] }) _BR_TABS_VO_META = base.ListMeta([{ 'id': BATTLEROYALE_ALIASES.BATTLE_ROYALE_SUMMARY_RESULTS_CMP, 'label': '', 'selected': True, 'enabled': True }, { 'id': BATTLEROYALE_ALIASES.BATTLE_ROYALE_SCORE_RESULTS_CMP, 'label': '', 'selected': False, 'enabled': True }]) BR_TABS_BLOCK = base.StatsBlock(_BR_TABS_VO_META, 'tabInfo') _COMMON_VO_META = base.DictMeta({ 'arenaStr': '', 'userName': '', 'clanAbbrev': '', 'playerVehicles': [], 'playerPlace': 0, 'isSquadMode': False, 'vehicleStatus': {} }) _PERSONAL_PLAYER_NAME_VO_META = base.PropertyMeta( (('userName', '', 'userName'), ('clanAbbrev', '', 'clanAbbrev'))) _PERSONAL_PLAYER_NAME_VO_META.bind(battle_royale.PersonalPlayerNameBlock) _VEHICLE_STATUS_BLOCK_VO_META = base.PropertyMeta( (('killer', {}, 'killer'), ('vehicleState', -1, 'vehicleState'), ('isSelfDestroyer', False, 'isSelfDestroyer')))
# Embedded file name: scripts/client/gui/battle_results/templates/cybersport.py from gui.battle_results.components import base CYBER_SPORT_BLOCK = base.StatsBlock(base.DictMeta({'teams': {}}), 'cyberSport')
'wasDone': False, 'scenarioProgress': [], 'rewards': [], 'accountProgress': {}}) _MAPS_TRAINING_RESULT_VO_META = base.DictMeta({'str': '', 'value': '', 'win': False}) _MAPS_TRAINING_BATTLE_GOAL_VO_META = base.DictMeta({'heavyTank': [0, 0], 'mediumTank': [0, 0], 'lightTank': [0, 0], 'SPG': [0, 0], 'AT-SPG': [0, 0]}) _MAPS_TRAINING_VEHICLE_VO_META = base.DictMeta({'type': '', 'name': ''}) _MAPS_TRAINING_ACC_PROGRESS_VO_META = base.DictMeta({'hasImproved': False}) _components = (maps_training.BattleResultBlock(_MAPS_TRAINING_RESULT_VO_META, 'result'), maps_training.BattleGoalsBlock(_MAPS_TRAINING_BATTLE_GOAL_VO_META, 'goal'), maps_training.BattleDurationItem('duration'), maps_training.StatsBlock(base.ListMeta(), 'stats'), maps_training.GeometryIdItem('geometryId'), maps_training.TeamItem('team'), maps_training.VehicleBlock(_MAPS_TRAINING_VEHICLE_VO_META, 'vehicle'), maps_training.DoneValueItem('doneValue'), maps_training.WasDoneItem('wasDone'), maps_training.ScenarioProgressBlock(base.ListMeta(), 'scenarioProgress'), maps_training.RewardsBlock(base.ListMeta(), 'rewards'), maps_training.AccountProgressBlock(_MAPS_TRAINING_ACC_PROGRESS_VO_META, 'accountProgress')) MAPS_TRAINING_RESULTS_BLOCK = base.StatsBlock(_MAPS_TRAINING_VO_META, '') for i, component in enumerate(_components): MAPS_TRAINING_RESULTS_BLOCK.addComponent(i, component)
'TeamStatsUI', 'viewId': 'TeamStatsUI', 'showWndBg': False }, { 'label': i18n.makeString(MENU.FINALSTATISTIC_TABS_DETAILSSTATS), 'linkage': 'DetailsStatsViewUI', 'viewId': 'DetailsStatsViewUI', 'showWndBg': True }]) EPIC_TABS_BLOCK = base.StatsBlock(_EPIC_TABS_VO_META, 'tabInfo') EPIC_TIME_STATS_BLOCK = base.StatsBlock(base.ListMeta(runtime=False), 'timeStats', _RECORD.COMMON) EPIC_TIME_STATS_BLOCK.addComponent( 0, common.ArenaShortTimeVO('arenaCreateTimeOnlyStr', 'arenaCreateTime')) EPIC_TIME_STATS_BLOCK.addComponent( 1, common.ArenaDurationVO('duration', 'duration')) EPIC_TIME_STATS_BLOCK.addNextComponent( common.ObjectivesReachedVO('objectivesReached')) EPIC_TIME_STATS_BLOCK.addNextComponent( common.ObjectivesDestroyedVO('objectivesDestroyed')) EPIC_TIME_STATS_BLOCK.addNextComponent(common.BasesCapturedVO('basesCaptured')) EPIC_COMMON_STATS_BLOCK = regular.REGULAR_COMMON_STATS_BLOCK.clone( 7, 9, 10, 11) EPIC_COMMON_STATS_BLOCK.addComponent( 7, common.EpicBattleBattleFinishResultBlock())