Exemple #1
0
 def isEnabled(self):
     areSettingsInited = self.__areSettingsInited()
     arenaGuiType = ARENA_GUI_TYPE.RANDOM
     if IS_DEVELOPMENT:
         arenaGuiType = ARENA_GUI_TYPE.TRAINING
     return arena_info.getArenaGuiType(
     ) == arenaGuiType and areSettingsInited
 def _addArenaExtraData(self, arenaDP):
     winText = text_styles.main(FALLOUT.BATTLELOADING_MULTITEAM_WINTEXT)
     arenaInfoData = {'mapName': toUpper(arena_info.getArenaType().name),
      'battleTypeLocaleStr': '#menu:loading/battleTypes/%d' % arena_info.getArenaGuiType(),
      'winText': winText,
      'battleTypeFrameLabel': arena_info.getArenaGuiTypeLabel()}
     self.as_setArenaInfoS(arenaInfoData)
Exemple #3
0
 def __setVehicleData(self, vehicleDescr = None):
     if vehicleDescr is not None:
         vehicleType = vehicleDescr.type
         if getArenaGuiType() == ARENA_GUI_TYPE.HISTORICAL and getattr(vehicleType, 'historicalModelOf', None):
             vehicleType = getVehicleType(vehicleType.historicalModelOf)
         self.compactDescr = vehicleType.compactDescr
         tags = vehicleType.tags
         self.classTag = _getClassTag(tags)
         self.isObserver = _isObserver(tags)
         self.shortName = vehicleType.shortUserString
         self.name = Vehicle.getUserName(vehicleType=vehicleType, textPrefix=True)
         self.shortNameWithPrefix = Vehicle.getShortUserName(vehicleType=vehicleType, textPrefix=True)
         self.guiName = getShortUserName(vehicleType)
         self.nationID = vehicleType.id[0]
         self.level = vehicleType.level
         vName = vehicleType.name
         self.iconPath = settings.makeContourIconSFPath(vName)
         if not fo_precache.add(settings.makeContourIconResPath(vName)):
             self.iconPath = settings.UNKNOWN_CONTOUR_ICON_SF_PATH
     else:
         self.compactDescr = 0
         self.classTag = None
         self.isObserver = False
         self.shortName = settings.UNKNOWN_VEHICLE_NAME
         self.name = settings.UNKNOWN_VEHICLE_NAME
         self.guiName = settings.UNKNOWN_VEHICLE_NAME
         self.shortNameWithPrefix = settings.UNKNOWN_VEHICLE_NAME
         self.nationID = nations.NONE_INDEX
         self.level = settings.UNKNOWN_VEHICLE_LEVEL
         self.iconPath = settings.UNKNOWN_CONTOUR_ICON_SF_PATH
         self.shortNameWithPrefix = settings.UNKNOWN_VEHICLE_NAME
     return
 def setPeriodInfo(self, period, endTime, length, soundID = None):
     if arena_info.getArenaGuiType() != ARENA_GUI_TYPE.TUTORIAL:
         ctrl = BattleReplay.g_replayCtrl
         connectionManager.onDisconnected += self.__onDisconnected
         ctrl.onStopped += self.__onReplayStopped
         self.__recorder = ctrl.setArenaPeriod
     else:
         self.__recorder = None
     super(ArenaPeriodRecorder, self).setPeriodInfo(period, endTime, length, soundID)
 def invalidateVehicleInfo(self, flags, playerVehVO, arenaDP):
     if arena_info.getArenaGuiType() == ARENA_GUI_TYPE.RANDOM:
         if flags & INVALIDATE_OP.PREBATTLE_CHANGED and playerVehVO.squadIndex > 0:
             vID = playerVehVO.vehicleID
             squadMansToUpdate = ()
             avatarVehID = avatar_getter.getPlayerVehicleID()
             aVehInfo = arenaDP.getVehicleInfo(avatarVehID)
             if vID == avatarVehID:
                 squadMansToUpdate = arenaDP.getVehIDsByPrebattleID(aVehInfo.team, aVehInfo.prebattleID) or tuple()
                 if avatarVehID in squadMansToUpdate:
                     del squadMansToUpdate[squadMansToUpdate.index(avatarVehID)]
             elif aVehInfo.team == playerVehVO.team:
                 if arenaDP.isSquadMan(vID):
                     squadMansToUpdate = (vID,)
             for sqVehID in squadMansToUpdate:
                 for client in self.__clients:
                     client.updateSquadmanVeh(sqVehID)
Exemple #6
0
 def __setVehicleData(self, vehicleDescr = None):
     if vehicleDescr is not None:
         vehicleType = vehicleDescr.type
         if getArenaGuiType() == ARENA_GUI_TYPE.HISTORICAL and getattr(vehicleType, 'historicalModelOf', None):
             vehicleType = getVehicleType(vehicleType.historicalModelOf)
         self.compactDescr = vehicleType.compactDescr
         self.tags = vehicleType.tags.copy()
         self.shortName = vehicleType.shortUserString
         self.name = vehicleType.shortUserString if self.isPremiumIGR() else vehicleType.userString
         self.level = vehicleType.level
         self.iconPath = makeContourIconPath(vehicleType.name)
     else:
         self.compactDescr = 0
         self.tags = frozenset()
         self.shortName = UNKNOWN_VEHICLE_NAME
         self.name = UNKNOWN_VEHICLE_NAME
         self.level = UNKNOWN_VEHICLE_LEVEL
         self.iconPath = UNKNOWN_CONTOUR_ICON_PATH
     return
Exemple #7
0
 def isEnabled(self):
     areSettingsInited = self.__areSettingsInited()
     arenaGuiTypes = [ARENA_GUI_TYPE.RANDOM, ARENA_GUI_TYPE.SANDBOX, ARENA_GUI_TYPE.RATED_SANDBOX]
     if IS_DEVELOPMENT:
         arenaGuiTypes.append(ARENA_GUI_TYPE.TRAINING)
     return arena_info.getArenaGuiType() in arenaGuiTypes and areSettingsInited
Exemple #8
0
 def isEnabled(self):
     areSettingsInited = self.__areSettingsInited()
     arenaGuiType = ARENA_GUI_TYPE.RANDOM
     if IS_DEVELOPMENT:
         arenaGuiType = ARENA_GUI_TYPE.TRAINING
     return arena_info.getArenaGuiType() == arenaGuiType and areSettingsInited
Exemple #9
0
 def isEnabled(self):
     return arena_info.getArenaGuiType() == ARENA_GUI_TYPE.TUTORIAL
Exemple #10
0
 def isEnabled(self):
     return arena_info.getArenaGuiType() == ARENA_GUI_TYPE.TUTORIAL
 def arenaLoadCompleted(self):
     BigWorld.wg_setReducedFpsMode(False)
     from messenger import MessengerEntry
     MessengerEntry.g_instance.onAvatarShowGUI()
     g_appLoader.showBattle(arenaGuiType=getArenaGuiType())
     BigWorld.wg_clearTextureReuseList()
 def spaceLoadStarted(self):
     game_control.g_instance.gameSession.incBattlesCounter()
     g_appLoader.showBattleLoading(arenaGuiType=getArenaGuiType())
     BigWorld.wg_setReducedFpsMode(True)
Exemple #13
0
 def spaceLoadStarted(self):
     game_control.g_instance.gameSession.incBattlesCounter()
     g_appLoader.showBattleLoading(arenaGuiType=getArenaGuiType(),
                                   isMultiTeam=self.__isMultiTeam)
     BigWorld.wg_setReducedFpsMode(True)