/// <summary>
        /// Sets the Enabled status of the mod with the given index.
        /// </summary>
        public static void SetEnabled(int index, bool enabled)
        {
            GadgetModInfo modInfo = GetModInfo(index);

            modInfo.Mod.Enabled = enabled;
            GadgetCoreConfig.enabledMods[modInfo.Attribute.Name] = enabled;
            GadgetCoreConfig.Update();
        }
 internal static void RegisterMod(GadgetModInfo mod)
 {
     mods.Add(mod.Attribute.Name, mod);
     foreach (string name in mod.Mod.GetPreviousModNames())
     {
         previousNames[name] = mod;
     }
     if (sortedModList != null)
     {
         SortMods();
     }
 }
 /// <summary>
 /// Sets the Enabled status of the given mod. Note that this can be queried using GadgetMod.Enabled, although it will not apply until the game is restarted.
 /// </summary>
 public static void SetEnabled(GadgetModInfo mod, bool enabled)
 {
     mod.Mod.Enabled = enabled;
     GadgetCoreConfig.enabledMods[mod.Attribute.Name] = enabled;
     GadgetCoreConfig.Update();
 }