def apply(self, diff, restartApproved): diff = self.__settingsDiffPreprocessing(diff) applyMethod = self.getApplyMethod(diff) g_settingsCore.applySettings(diff) confirmators = g_settingsCore.applyStorages(restartApproved) g_settingsCore.confirmChanges(confirmators) if len(set(graphics.GRAPHICS_SETTINGS.ALL()) & set(diff.keys())): BigWorld.commitPendingGraphicsSettings() return applyMethod == options.APPLY_METHOD.RESTART
def apply(self, diff, restartApproved): """ Applies given settings diff :param diff: [dict(settingName->settingValue)] settings values :param restartApproved: was restart approved :return: restart needed flag """ diff = self.__settingsDiffPreprocessing(diff) applyMethod = self.getApplyMethod(diff) g_settingsCore.applySettings(diff) confirmators = g_settingsCore.applyStorages(restartApproved) g_settingsCore.confirmChanges(confirmators) if len(set(graphics.GRAPHICS_SETTINGS.ALL()) & set(diff.keys())): BigWorld.commitPendingGraphicsSettings() return applyMethod == options.APPLY_METHOD.RESTART