private static ModSettingsExportTemplate GetTemplate(Version version) { if (!deserializedBinary.TryGetValue(version, out var result)) { result = new ModSettingsExportTemplate(); deserializedBinary.Add(version, result); } return(result); }
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); } } }