You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
900 B

  1. using IPA.Config;
  2. using IPA.Config.Stores;
  3. using IPA.Config.Stores.Attributes;
  4. using IPA.Utilities;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace IPA.Loader
  11. {
  12. internal class DisabledConfig
  13. {
  14. public static Config.Config Disabled { get; set; }
  15. public static DisabledConfig Instance;
  16. public static void Load()
  17. {
  18. Disabled = Config.Config.GetConfigFor("Disabled Mods", "json");
  19. Instance = Disabled.Generated<DisabledConfig>();
  20. }
  21. public virtual bool Reset { get; set; } = true;
  22. public virtual HashSet<string> DisabledModIds { get; set; } = new HashSet<string>();
  23. protected virtual void OnReload()
  24. {
  25. if (DisabledModIds == null)
  26. DisabledModIds = new HashSet<string>();
  27. }
  28. }
  29. }