def _destroy(self):
     defaults = AccountSettings.getFilterDefault(GUI_START_BEHAVIOR)
     serverSettings = self.settingsCore.serverSettings
     stateFlags = serverSettings.getSection(GUI_START_BEHAVIOR, defaults)
     stateFlags['isEpicWelcomeViewShowed'] = True
     serverSettings.setSectionSettings(GUI_START_BEHAVIOR, stateFlags)
     super(EpicBattlesInfoView, self)._destroy()
Пример #2
0
    def load(self):
        filters = AccountSettings.getFilterDefaults(self._serverSections)
        for section in self._clientSections:
            filters.update(AccountSettings.getFilterDefault(section))

        self._filters = filters
        self.update(filters, save=False)
Пример #3
0
 def save(self):
     filters = AccountSettings.getFilterDefault(MISSION_SELECTOR_FILTER)
     filters = {
         key: value
         for key, value in self._filters.iteritems() if key in filters
     }
     caches.getNavInfo().setVehicleSelectorFilters(filters)
Пример #4
0
    def __setFilters(self):
        if self.__multiselectionMode:
            self.__vehiclesFilterSection = FALLOUT_CAROUSEL_FILTER
        else:
            self.__vehiclesFilterSection = CAROUSEL_FILTER
        defaults = AccountSettings.getFilterDefault(
            self.__vehiclesFilterSection)
        filters = g_settingsCore.serverSettings.getSection(
            self.__vehiclesFilterSection, defaults)
        tankTypeIsNegative = filters['tankTypeIsNegative']
        del filters['tankTypeIsNegative']
        if tankTypeIsNegative:
            intTankType = -filters['tankType']
        else:
            intTankType = filters['tankType']
        filters['tankType'] = 'none'
        for idx, type in enumerate(VEHICLE_CLASS_TAGS):
            if idx == intTankType:
                filters['tankType'] = type
                break

        nationIsNegative = filters['nationIsNegative']
        del filters['nationIsNegative']
        if nationIsNegative:
            filters['nation'] = -filters['nation']
        self.__vehiclesFilter = filters
        self.as_setCarouselFilterS(self.__vehiclesFilter)
 def _populate(self):
     super(EpicBattlesInfoView, self)._populate()
     self.as_setDataS(self._packInfoViewVO())
     defaults = AccountSettings.getFilterDefault(GUI_START_BEHAVIOR)
     stateFlags = self.settingsCore.serverSettings.getSection(
         GUI_START_BEHAVIOR, defaults)
     self.as_showInfoLinesS(not stateFlags['isEpicWelcomeViewShowed'])
Пример #6
0
    def __setFilters(self):
        if self.__multiselectionMode:
            self.__vehiclesFilterSection = FALLOUT_CAROUSEL_FILTER
        else:
            self.__vehiclesFilterSection = CAROUSEL_FILTER
        defaults = AccountSettings.getFilterDefault(self.__vehiclesFilterSection)
        filters = g_settingsCore.serverSettings.getSection(self.__vehiclesFilterSection, defaults)
        tankTypeIsNegative = filters['tankTypeIsNegative']
        del filters['tankTypeIsNegative']
        if tankTypeIsNegative:
            intTankType = -filters['tankType']
        else:
            intTankType = filters['tankType']
        filters['tankType'] = 'none'
        for idx, type in enumerate(VEHICLE_CLASS_TAGS):
            if idx == intTankType:
                filters['tankType'] = type
                break

        nationIsNegative = filters['nationIsNegative']
        del filters['nationIsNegative']
        if nationIsNegative:
            filters['nation'] = -filters['nation']
        self.__vehiclesFilter = filters
        self.as_setCarouselFilterS(self.__vehiclesFilter)
Пример #7
0
 def __processWelcome(self):
     defaults = AccountSettings.getFilterDefault(GUI_START_BEHAVIOR)
     filters = self.settingsCore.serverSettings.getSection(
         GUI_START_BEHAVIOR, defaults)
     if not filters['isEpicWelcomeViewShowed']:
         g_eventDispatcher.loadEpicWelcome()
         return FUNCTIONAL_FLAG.LOAD_PAGE
     return FUNCTIONAL_FLAG.UNDEFINED
Пример #8
0
    def load(self):
        filters = AccountSettings.getFilterDefaults(self._serverSections)
        for section in self._clientSections:
            filters.update(AccountSettings.getFilterDefault(section))

        filters.update(caches.getNavInfo().getVehicleSelectorFilters())
        self._filters = filters
        self.update(filters, save=False)
Пример #9
0
 def _getInitDataObject(self):
     defaults = AccountSettings.getFilterDefault(CONTACTS)
     self.__startData = self.settingsCore.serverSettings.getSection(CONTACTS, defaults)
     self.__startData['showOfflineUsers'] = bool(self.__startData['showOfflineUsers'])
     self.__startData['showOthersCategory'] = bool(self.__startData['showOthersCategory'])
     self.__currentData = self.__startData.copy()
     baseData = self._getDefaultInitData(MESSENGER.MESSENGER_CONTACTS_VIEW_SETTINGS_MAINLABEL, MESSENGER.MESSENGER_CONTACTS_VIEW_SETTINGS_BTNOK_LABEL, MESSENGER.MESSENGER_CONTACTS_VIEW_SETTINGS_BTNCANCEL_LABEL, MESSENGER.CONTACTS_SETTINGSVIEW_TOOLTIPS_BTNS_APPLY, MESSENGER.CONTACTS_SETTINGSVIEW_TOOLTIPS_BTNS_CLOSE)
     baseData['mainData'] = self.__startData
     return baseData
Пример #10
0
 def _disbandClub(self, club):
     if len(club.getMembers()) > 1:
         i18nKey = 'discontinuingFormationConfirmation'
     else:
         i18nKey = 'discontinuingEmptyFormationConfirmation'
     sysMsg = club_fmts.getDestroyClubSysMsg(self.clubsCtrl.getClub(self._clubDbID))
     self._doExitAction(DestroyClubCtx(self._clubDbID), I18nConfirmDialogMeta('staticFormation/staffView/%s' % i18nKey, focusedID=DIALOG_BUTTON_ID.CLOSE), WAITING.CLUBS_DESTROYCLUB, sysMsg)
     inviteAnimationDefaultValue = AccountSettings.getFilterDefault(SHOW_INVITE_COMMAND_BTN_ANIMATION)
     AccountSettings.setFilter(SHOW_INVITE_COMMAND_BTN_ANIMATION, inviteAnimationDefaultValue)
Пример #11
0
 def _getInitDataObject(self):
     defaults = AccountSettings.getFilterDefault(CONTACTS)
     self.__startData = g_settingsCore.serverSettings.getSection(CONTACTS, defaults)
     self.__startData['showOfflineUsers'] = bool(self.__startData['showOfflineUsers'])
     self.__startData['showOthersCategory'] = bool(self.__startData['showOthersCategory'])
     self.__currentData = self.__startData.copy()
     baseData = self._getDefaultInitData(MESSENGER.MESSENGER_CONTACTS_VIEW_SETTINGS_MAINLABEL, MESSENGER.MESSENGER_CONTACTS_VIEW_SETTINGS_BTNOK_LABEL, MESSENGER.MESSENGER_CONTACTS_VIEW_SETTINGS_BTNCANCEL_LABEL, MESSENGER.CONTACTS_SETTINGSVIEW_TOOLTIPS_BTNS_APPLY, MESSENGER.CONTACTS_SETTINGSVIEW_TOOLTIPS_BTNS_CLOSE)
     baseData['mainData'] = self.__startData
     return baseData
Пример #12
0
 def save(self):
     self._saveToServer()
     for section in self._clientSections:
         defaultFilter = AccountSettings.getFilterDefault(section)
         filtersToSave = {
             key: self._filters.get(key, defaultFilter[key])
             for key in defaultFilter
         }
         AccountSettings.setFilter(section, filtersToSave)
 def __close(self):
     defaults = AccountSettings.getFilterDefault(GUI_START_BEHAVIOR)
     stateFlags = self.settingsCore.serverSettings.getSection(
         GUI_START_BEHAVIOR, defaults)
     stateFlags['isEpicWelcomeViewShowed'] = True
     self.settingsCore.serverSettings.setSectionSettings(
         GUI_START_BEHAVIOR, stateFlags)
     self.fireEvent(events.LoadViewEvent(VIEW_ALIAS.LOBBY_HANGAR),
                    scope=EVENT_BUS_SCOPE.LOBBY)
     self.destroy()
Пример #14
0
 def _onRegisterFlashComponent(self, viewPy, alias):
     super(ContactsListPopover, self)._onRegisterFlashComponent(viewPy, alias)
     if alias == CONTACTS_ALIASES.CONTACTS_TREE:
         tree = self.pyTree
         if tree:
             settings = g_settingsCore.serverSettings.getSection(CONTACTS, AccountSettings.getFilterDefault(CONTACTS))
             onlineMode = None if settings['showOfflineUsers'] else True
             showOthers = bool(settings['showOthersCategory'])
             tree.showContacts(onlineMode=onlineMode, showVisibleOthers=showOthers, showEmptyGroups=True)
     return
    def reset(self, keys=None, exceptions=None, save=True):
        defaultFilters = AccountSettings.getFilterDefaults(self._serverSections)
        for section in self._clientSections:
            defaultFilters.update(AccountSettings.getFilterDefault(section))

        keys = keys or defaultFilters.iterkeys()
        exceptions = exceptions or []
        keys = [ key for key in keys if key not in exceptions ]
        defaultFilters = _filterDict(defaultFilters, keys)
        self.update(defaultFilters, save)
Пример #16
0
 def __init__(self, ctx):
     super(NYDecorationsPopover, self).__init__()
     self.__slotID = -1
     self.__arrowDirection = -1
     if 'data' in ctx:
         self.__slotID = ctx['data'].slotId
         self.__arrowDirection = ctx['data'].arrowDirection
     self.__defaultLevel, self.__defaultNation = AccountSettings.getFilterDefault(NY_DECORATIONS_POPOVER_FILTER_1)
     self.__filterLevel, self.__filterNation = AccountSettings.getFilter(NY_DECORATIONS_POPOVER_FILTER_1)
     self.__toysCount = 0
     self.__seenToys = {}
Пример #17
0
 def atCall(self, cd):
     from gui import DialogsInterface
     from account_helpers.AccountSettings import AccountSettings, GUI_START_BEHAVIOR
     defaults = AccountSettings.getFilterDefault(GUI_START_BEHAVIOR)
     filters = self.settingsCore.serverSettings.getSection(GUI_START_BEHAVIOR, defaults)
     filters['isFreeXPInfoDialogShowed'] = True
     self.settingsCore.serverSettings.setSectionSettings(GUI_START_BEHAVIOR, filters)
     cd.avoid()
     yield DialogsInterface.showDialog(FreeXPInfoMeta())
     cd.function(*cd._packArgs(), **cd._kwargs)
     self.callback([ExchangeFreeXPToTankmanPointcut, ResearchViewPointcut])
Пример #18
0
 def __checkFreeXPConditions(self):
     from account_helpers.AccountSettings import AccountSettings, GUI_START_BEHAVIOR
     defaults = AccountSettings.getFilterDefault(GUI_START_BEHAVIOR)
     filters = self.settingsCore.serverSettings.getSection(GUI_START_BEHAVIOR, defaults)
     if filters['isFreeXPInfoDialogShowed']:
         return
     self.__weaver = Weaver()
     if self.__weaver.findPointcut(ResearchViewPointcut) == -1:
         self.__weaver.weave(pointcut=ResearchViewPointcut, aspects=[ShowXPInfoDialogAspect(self.cleanWeave)])
     if self.__weaver.findPointcut(ExchangeFreeXPToTankmanPointcut) == -1:
         self.__weaver.weave(pointcut=ExchangeFreeXPToTankmanPointcut, aspects=[ShowXPInfoDialogAspect(self.cleanWeave)])
    def isDefault(self, keys=None):
        defaultFilters = AccountSettings.getFilterDefaults(self._serverSections)
        for section in self._clientSections:
            defaultFilters.update(AccountSettings.getFilterDefault(section))

        if keys is None:
            keys = defaultFilters.keys()
        for key in keys:
            if self._filters[key] != defaultFilters[key]:
                return False

        return True
Пример #20
0
 def __checkFreeXPConditions(self):
     from account_helpers.AccountSettings import AccountSettings, GUI_START_BEHAVIOR
     from account_helpers.settings_core.SettingsCore import g_settingsCore
     defaults = AccountSettings.getFilterDefault(GUI_START_BEHAVIOR)
     filters = g_settingsCore.serverSettings.getSection(GUI_START_BEHAVIOR, defaults)
     if filters['isFreeXPInfoDialogShowed']:
         return
     self.__weaver = Weaver()
     if self.__weaver.findPointcut(ResearchViewPointcut) is -1:
         self.__weaver.weave(pointcut=ResearchViewPointcut, aspects=[ShowXPInfoDialogAspect(self.cleanWeave)])
     if self.__weaver.findPointcut(ExchangeFreeXPToTankmanPointcut) is -1:
         self.__weaver.weave(pointcut=ExchangeFreeXPToTankmanPointcut, aspects=[ShowXPInfoDialogAspect(self.cleanWeave)])
Пример #21
0
    def load(self):
        defaultFilters = AccountSettings.getFilterDefaults(self._serverSections)
        savedFilters = self.settingsCore.serverSettings.getSections(self._serverSections, defaultFilters)
        for section in self._clientSections:
            defaultFilters.update(AccountSettings.getFilterDefault(section))
            savedFilters.update(AccountSettings.getFilter(section))

        self._filters = defaultFilters
        for key, value in defaultFilters.iteritems():
            savedFilters[key] = type(value)(savedFilters[key])

        self.update(savedFilters, save=False)
Пример #22
0
 def __processWelcome(self):
     """
     Processes state and display welcome view if wasn't shown before
     :return: process functional flag result
     """
     defaults = AccountSettings.getFilterDefault(GUI_START_BEHAVIOR)
     filters = self.settingsCore.serverSettings.getSection(
         GUI_START_BEHAVIOR, defaults)
     if not filters['isRankedWelcomeViewShowed']:
         g_eventDispatcher.loadRanked()
         return FUNCTIONAL_FLAG.LOAD_PAGE
     return FUNCTIONAL_FLAG.UNDEFINED
Пример #23
0
 def atCall(self, cd):
     from gui import DialogsInterface
     from account_helpers.AccountSettings import AccountSettings, GUI_START_BEHAVIOR
     from account_helpers.settings_core.SettingsCore import g_settingsCore
     defaults = AccountSettings.getFilterDefault(GUI_START_BEHAVIOR)
     filters = g_settingsCore.serverSettings.getSection(GUI_START_BEHAVIOR, defaults)
     filters['isFreeXPInfoDialogShowed'] = True
     g_settingsCore.serverSettings.setSectionSettings(GUI_START_BEHAVIOR, filters)
     cd.avoid()
     yield DialogsInterface.showDialog(FreeXPInfoMeta())
     cd.function(*cd._packArgs(), **cd._kwargs)
     self.callback([ExchangeFreeXPToTankmanPointcut, ResearchViewPointcut])
 def __confirmFightButtonPressEnabled(self, callback):
     if not self.__isInValidPrebattle():
         callback(True)
         return
     defaults = AccountSettings.getFilterDefault(GUI_START_BEHAVIOR)
     filters = self.settingsCore.serverSettings.getSection(GUI_START_BEHAVIOR, defaults)
     isEpicPerformanceWarningEnabled = not AccountSettings.getSettings('isEpicPerformanceWarningClicked')
     if isEpicPerformanceWarningEnabled:
         result, checkboxChecked = yield DialogsInterface.showI18nCheckBoxDialog('epicBattleConfirmDialog')
         filters['isEpicPerformanceWarningClicked'] = checkboxChecked
         AccountSettings.setSettings('isEpicPerformanceWarningClicked', checkboxChecked)
     else:
         result = True
     callback(result)
Пример #25
0
    def load(self):
        defaultFilters = AccountSettings.getFilterDefaults(
            self._serverSections)
        savedFilters = self._getFromServerStorage(defaultFilters)
        for section in self._clientSections:
            defaultFilters.update(AccountSettings.getFilterDefault(section))
            savedFilters.update(AccountSettings.getFilter(section))

        self._filters = defaultFilters
        for key, value in defaultFilters.iteritems():
            savedFilters[key] = type(value)(savedFilters.get(key, value))

        self.update(savedFilters, save=False)
        self.newYearReset()
 def processLicense(self, callback=None):
     self.EULACallback = callback
     from account_helpers.AccountSettings import AccountSettings, EULA_VERSION
     defaults = AccountSettings.getFilterDefault(EULA_VERSION)
     filters = self.settingsCore.serverSettings.getSection(EULA_VERSION, defaults)
     self.serverVersion = int(filters['version'])
     self.isShow = False
     xmlVersion = self.EULAVersion.xmlVersion
     if self.serverVersion != xmlVersion and xmlVersion != 0:
         self.isShow = True
     if self.isShow:
         Waiting.close()
         self.create()
     else:
         callback(True)
 def __processWelcome(self):
     defaults = AccountSettings.getFilterDefault(GUI_START_BEHAVIOR)
     filters = self.__settingsCore.serverSettings.getSection(
         GUI_START_BEHAVIOR, defaults)
     rankedWelcomeCallback = self.__rankedController.getRankedWelcomeCallback(
     )
     if rankedWelcomeCallback is None:
         if not filters['isRankedWelcomeViewShowed']:
             g_eventDispatcher.loadRanked()
             return FUNCTIONAL_FLAG.LOAD_PAGE
         return FUNCTIONAL_FLAG.UNDEFINED
     else:
         rankedWelcomeCallback()
         self.__rankedController.clearRankedWelcomeCallback()
         return FUNCTIONAL_FLAG.LOAD_PAGE
Пример #28
0
 def processLicense(self, callback = None):
     self.EULACallback = callback
     from account_helpers.AccountSettings import AccountSettings, EULA_VERSION
     from account_helpers.settings_core.SettingsCore import g_settingsCore
     defaults = AccountSettings.getFilterDefault(EULA_VERSION)
     filters = g_settingsCore.serverSettings.getSection(EULA_VERSION, defaults)
     self.serverVersion = int(filters['version'])
     self.isShow = False
     xmlVersion = self.EULAVersion.xmlVersion
     if self.serverVersion != xmlVersion and xmlVersion != 0:
         self.isShow = True
     if self.isShow:
         Waiting.close()
         self.create()
     else:
         callback(True)
Пример #29
0
 def processLicense(self, callback=None):
     self.EULACallback = callback
     from account_helpers.AccountSettings import AccountSettings, EULA_VERSION
     defaults = AccountSettings.getFilterDefault(EULA_VERSION)
     filters = self.settingsCore.serverSettings.getSection(EULA_VERSION, defaults)
     self.serverVersion = int(filters['version'])
     self.isShow = False
     xmlVersion = self.EULAVersion.xmlVersion
     EULASettings = self.lobbyContext.getServerSettings().eula
     if self.serverVersion != xmlVersion and xmlVersion != 0 and EULASettings.isEnabled() and (not self._demoAccController.isDemoAccount or EULASettings.isDemoAccEnabled()) and (not self._steamRegistrationCtrl.isSteamAccount or EULASettings.isSteamAccEnabled()):
         self.isShow = True
     if self.isShow:
         Waiting.close()
         self.create()
     else:
         callback(True)
Пример #30
0
    def reset(self, keys = None, exceptions = None, save = True):
        """ Reset filters to their default state.
        
        :param keys: if specified, resets only the filters listed in this parameter.
        :param exceptions: if specified, excludes given filters from reseting.
        :param save: flag that determines whether filters should be saved immediately.
        """
        defaultFilters = AccountSettings.getFilterDefaults(self._serverSections)
        for section in self._clientSections:
            defaultFilters.update(AccountSettings.getFilterDefault(section))

        keys = keys or defaultFilters.keys()
        exceptions = exceptions or []
        keys = [ key for key in keys if key not in exceptions ]
        defaultFilters = _filterDict(defaultFilters, keys)
        self.update(defaultFilters, save)
Пример #31
0
 def _onRegisterFlashComponent(self, viewPy, alias):
     super(ContactsListPopover, self)._onRegisterFlashComponent(viewPy, alias)
     if alias == CONTACTS_ALIASES.CONTACTS_TREE:
         tree = self.pyTree
         if tree:
             g_messengerEvents.users.onEmptyGroupsChanged += self.__onEmptyGroupsChanged
             tree.onGroupToggled += self.__onGroupToggled
             settings = g_settingsCore.serverSettings.getSection(CONTACTS, AccountSettings.getFilterDefault(CONTACTS))
             onlineMode = None if settings['showOfflineUsers'] else True
             showOthers = bool(settings['showOthersCategory'])
             tree.showContacts(onlineMode=onlineMode, showVisibleOthers=showOthers, showEmptyGroups=True)
             myDP = tree.getMainDP()
             openedGroups = self.usersStorage.getOpenedGroups()
             for categoryId, groupsSet in openedGroups.iteritems():
                 for groupName in groupsSet:
                     myDP.toggleGroup(categoryId, groupName)
Пример #32
0
 def _disbandClub(self, club):
     if len(club.getMembers()) > 1:
         i18nKey = 'discontinuingFormationConfirmation'
     else:
         i18nKey = 'discontinuingEmptyFormationConfirmation'
     sysMsg = club_fmts.getDestroyClubSysMsg(
         self.clubsCtrl.getClub(self._clubDbID))
     self._doExitAction(
         DestroyClubCtx(self._clubDbID),
         I18nConfirmDialogMeta('staticFormation/staffView/%s' % i18nKey,
                               focusedID=DIALOG_BUTTON_ID.CLOSE),
         WAITING.CLUBS_DESTROYCLUB, sysMsg)
     inviteAnimationDefaultValue = AccountSettings.getFilterDefault(
         SHOW_INVITE_COMMAND_BTN_ANIMATION)
     AccountSettings.setFilter(SHOW_INVITE_COMMAND_BTN_ANIMATION,
                               inviteAnimationDefaultValue)
Пример #33
0
    def isDefault(self, keys = None):
        """ Check whether filters are in default state or not.
        
        :param keys: if specified, check only the filters listed in this parameter.
        :return: True if filters are in default state, False otherwise.
        """
        defaultFilters = AccountSettings.getFilterDefaults(self._serverSections)
        for section in self._clientSections:
            defaultFilters.update(AccountSettings.getFilterDefault(section))

        if keys is None:
            keys = defaultFilters.keys()
        for key in keys:
            if self._filters[key] != defaultFilters[key]:
                return False

        return True
Пример #34
0
 def _onRegisterFlashComponent(self, viewPy, alias):
     super(ContactsListPopover,
           self)._onRegisterFlashComponent(viewPy, alias)
     if alias == CONTACTS_ALIASES.CONTACTS_TREE:
         tree = self.pyTree
         if tree:
             g_messengerEvents.users.onEmptyGroupsChanged += self.__onEmptyGroupsChanged
             tree.onGroupToggled += self.__onGroupToggled
             settings = g_settingsCore.serverSettings.getSection(
                 CONTACTS, AccountSettings.getFilterDefault(CONTACTS))
             onlineMode = None if settings['showOfflineUsers'] else True
             showOthers = bool(settings['showOthersCategory'])
             tree.showContacts(onlineMode=onlineMode,
                               showVisibleOthers=showOthers,
                               showEmptyGroups=True)
             myDP = tree.getMainDP()
             openedGroups = self.usersStorage.getOpenedGroups()
             for categoryId, groupsSet in openedGroups.iteritems():
                 for groupName in groupsSet:
                     myDP.toggleGroup(categoryId, groupName)
 def _packInfoViewVO(self):
     pPrestigeLevel, pMetaLevel, pFamePts = self.epicMetaGameCtrl.getPlayerLevelInfo(
     )
     famePtsToProgress = self.epicMetaGameCtrl.getPointsProgessForLevel(
         pMetaLevel)
     percentage = float(pFamePts) / float(
         famePtsToProgress) * 100 if famePtsToProgress > 0 else 100
     maxPrestigeLevel = self.lobbyCtx.getServerSettings(
     ).epicMetaGame.metaLevel.get('maxPrestigeLevel', 0)
     maxMetaLevel = self.lobbyCtx.getServerSettings(
     ).epicMetaGame.metaLevel.get('maxLevel', 0)
     prestigeAllowed = pPrestigeLevel != maxPrestigeLevel and pMetaLevel == maxMetaLevel
     if pMetaLevel == maxMetaLevel:
         barText = i18n.makeString(
             EPIC_BATTLE.EPICBATTLESINFOVIEW_MAXMETASTRING)
     else:
         barText = str(pFamePts) + text_styles.stats('/' +
                                                     str(famePtsToProgress))
     defaults = AccountSettings.getFilterDefault(GUI_START_BEHAVIOR)
     filters = self.settingsCore.serverSettings.getSection(
         GUI_START_BEHAVIOR, defaults)
     isFirstTimeInWelcomeScreen = not filters['isEpicWelcomeViewShowed']
     return EpicBattlesInfoViewVO(
         firstTimeInScreen=isFirstTimeInWelcomeScreen,
         backgroundImageSrc=RES_ICONS.
         MAPS_ICONS_EPICBATTLES_BACKGROUNDS_META_BG,
         headlineTitleHtmlText=text_styles.heroTitle(
             i18n.makeString(
                 EPIC_BATTLE.EPICBATTLESINFOVIEW_BATTLEMODETITLE)),
         epicMetaLevelIconData=getEpicMetaIconVODict(
             pPrestigeLevel, pMetaLevel),
         barPercentage=percentage,
         barText=barText,
         prestigeAllowed=prestigeAllowed,
         skillPoints=self.epicMetaGameCtrl.getSkillPoints(),
         rulePanels=self._packRulePanelsVO(
             isFirstTimeInWelcomeScreen, prestigeAllowed,
             self.epicMetaGameCtrl.getSkillPoints()))
Пример #36
0
    def __init__(self):
        super(TankCarousel, self).__init__()
        self.__updateVehiclesTimerId = None
        defaults = AccountSettings.getFilterDefault(CAROUSEL_FILTER)
        from account_helpers.settings_core.SettingsCore import g_settingsCore
        filters = g_settingsCore.serverSettings.getSection(CAROUSEL_FILTER, defaults)
        tankTypeIsNegative = filters['tankTypeIsNegative']
        del filters['tankTypeIsNegative']
        if tankTypeIsNegative:
            intTankType = -filters['tankType']
        else:
            intTankType = filters['tankType']
        filters['tankType'] = 'none'
        for idx, type in enumerate(VEHICLE_CLASS_TAGS):
            if idx == intTankType:
                filters['tankType'] = type
                break

        nationIsNegative = filters['nationIsNegative']
        del filters['nationIsNegative']
        if nationIsNegative:
            filters['nation'] = -filters['nation']
        self.vehiclesFilter = filters
Пример #37
0
    def __init__(self):
        super(TankCarousel, self).__init__()
        self.__updateVehiclesTimerId = None
        defaults = AccountSettings.getFilterDefault(CAROUSEL_FILTER)
        from account_helpers.SettingsCore import g_settingsCore
        filters = g_settingsCore.serverSettings.getSection(CAROUSEL_FILTER, defaults)
        tankTypeIsNegative = filters['tankTypeIsNegative']
        del filters['tankTypeIsNegative']
        if tankTypeIsNegative:
            intTankType = -filters['tankType']
        else:
            intTankType = filters['tankType']
        filters['tankType'] = 'none'
        for idx, type in enumerate(VEHICLE_CLASS_TAGS):
            if idx == intTankType:
                filters['tankType'] = type
                break

        nationIsNegative = filters['nationIsNegative']
        del filters['nationIsNegative']
        if nationIsNegative:
            filters['nation'] = -filters['nation']
        self.vehiclesFilter = filters
        return
Пример #38
0
def refreshContacts():
    settings = g_settingsCore.serverSettings.getSection(CONTACTS, AccountSettings.getFilterDefault(CONTACTS))
    g_settingsCore.onSettingsChanged(settings)
Пример #39
0
 def getContactListSettings(self):
     settings = self.settingsCore.serverSettings.getSection(
         CONTACTS, AccountSettings.getFilterDefault(CONTACTS))
     onlineMode = None if settings['showOfflineUsers'] else True
     showOthers = bool(settings['showOthersCategory'])
     return (onlineMode, showOthers)
Пример #40
0
def refreshContacts():
    settingsCore = dependency.instance(ISettingsCore)
    settings = settingsCore.serverSettings.getSection(CONTACTS, AccountSettings.getFilterDefault(CONTACTS))
    settingsCore.onSettingsChanged(settings)
Пример #41
0
def refreshContacts():
    settingsCore = dependency.instance(ISettingsCore)
    settings = settingsCore.serverSettings.getSection(
        CONTACTS, AccountSettings.getFilterDefault(CONTACTS))
    settingsCore.onSettingsChanged(settings)