def _updateToVersion(self, callback = None):
        currentVersion = g_settingsCache.getVersion()
        gameData = {}
        controlsData = {}
        aimData = {}
        markersData = {}
        keyboardData = {}
        initialized = False
        processed = False
        if currentVersion < 1:
            gameData, controlsData, aimData, markersData, keyboardData = self._initializeDefaultSettings()
            initialized = True
        if currentVersion < 2 and not initialized:

            @async
            def wrapper(callback = None):
                BigWorld.player().intUserSettings.delIntSettings(range(1, 60), callback)

            yield wrapper()
            gameData, controlsData, aimData, markersData, keyboardData = self._initializeDefaultSettings()
            initialized = True
            processed = True
        if currentVersion < 3:
            if not initialized:
                aimData.update({'arcade': self._core.getSetting('arcade'),
                 'sniper': self._core.getSetting('sniper')})
            aimData['arcade']['reloaderTimer'] = 100
            aimData['sniper']['reloaderTimer'] = 100
            if not initialized:
                gameData['horStabilizationSnp'] = self._core.getSetting('dynamicCamera')
        if not processed:
            yield lambda callback: callback(None)
        self._setSettingsSections(gameData, controlsData, aimData, markersData, keyboardData)
        callback(self)
        return
    def _updateToVersion(self, callback=None):
        currentVersion = g_settingsCache.getVersion()
        gameData = {}
        controlsData = {}
        aimData = {}
        markersData = {}
        keyboardData = {}
        initialized = False
        processed = False
        if currentVersion < 1:
            gameData, controlsData, aimData, markersData, keyboardData = self._initializeDefaultSettings(
            )
            initialized = True
        if currentVersion < 2 and not initialized:

            @async
            def wrapper(callback=None):
                BigWorld.player().intUserSettings.delIntSettings(
                    range(1, 60), callback)

            yield wrapper()
            gameData, controlsData, aimData, markersData, keyboardData = self._initializeDefaultSettings(
            )
            initialized = True
            processed = True
        if currentVersion < 3:
            if not initialized:
                aimData.update({
                    'arcade': self._core.getSetting('arcade'),
                    'sniper': self._core.getSetting('sniper')
                })
            aimData['arcade']['reloaderTimer'] = 100
            aimData['sniper']['reloaderTimer'] = 100
            if not initialized:
                gameData['horStabilizationSnp'] = self._core.getSetting(
                    'dynamicCamera')
        if not processed:
            yield lambda callback: callback(None)
        self._setSettingsSections(gameData, controlsData, aimData, markersData,
                                  keyboardData)
        callback(self)
        return
 def getVersion(self):
     return g_settingsCache.getVersion()
 def setVersion(self):
     if g_settingsCache.getVersion() != self.__version:
         g_settingsCache.setVersion(self.__version)
 def getVersion(self):
     return g_settingsCache.getVersion()
 def setVersion(self):
     if g_settingsCache.getVersion() != self.__version:
         g_settingsCache.setVersion(self.__version)