Exemple #1
0
 private static ModSettingsExportTemplate GetTemplate(Version version)
 {
     if (!deserializedBinary.TryGetValue(version, out var result))
     {
         result = new ModSettingsExportTemplate();
         deserializedBinary.Add(version, result);
     }
     return(result);
 }
Exemple #2
0
 private static void AddSettings(IHasModSettings mod)
 {
     if (mod.HasSettings && mod.Override)
     {
         var exportTemplate = new ModSettingsExportTemplate(mod);
         modSettings[mod.UniqueID] = exportTemplate;
     }
     else
     {
         if (modSettings.ContainsKey(mod.UniqueID))
         {
             modSettings.Remove(mod.UniqueID);
         }
     }
 }