示例#1
0
 public static void SaveConfig()
 {
     foreach (KeyValuePair <string, Dictionary <string, MelonPreference> > prefsInSection in prefs)
     {
         foreach (KeyValuePair <string, MelonPreference> pref in prefsInSection.Value)
         {
             pref.Value.Value = pref.Value.ValueEdited;
             ConfigFile.SetString(prefsInSection.Key, pref.Key, pref.Value.Value);
         }
     }
     MelonHandler.OnModSettingsApplied();
     MelonLogger.Log("Config Saved!");
 }