void ScriptConfig::ResetChangeableSettings()
{
for (SettingValueList::iterator it = this->settings.begin(); it != this->settings.end();) {
const ScriptConfigItem *config_item = this->info->GetConfigItem((*it).first);
assert(config_item != NULL);
bool erase = false;
if (_game_mode == GM_MENU || ((*config_item).flags & SCRIPTCONFIG_INGAME) != 0) {
erase = true;
}
if (!_settings_client.gui.ai_developer_tools && ((*config_item).flags & SCRIPTCONFIG_DEVELOPER) != 0) {
erase = false;
}
if (erase) {
free((*it).first);
it = this->settings.erase(it);
} else {
it++;
}
}
}