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.

42 lines
1.6 KiB

  1. using IPA.JsonConverters;
  2. using Newtonsoft.Json;
  3. using SemVer;
  4. using System.Collections.Generic;
  5. namespace IPA.Loader
  6. {
  7. internal class PluginManifest
  8. {
  9. [JsonProperty("name", Required = Required.Always)]
  10. public string Name;
  11. [JsonProperty("id", Required = Required.AllowNull)]
  12. public string Id;
  13. [JsonProperty("description", Required = Required.Always)]
  14. public string Description;
  15. [JsonProperty("version", Required = Required.Always), JsonConverter(typeof(SemverVersionConverter))]
  16. public Version Version;
  17. [JsonProperty("gameVersion", Required = Required.Always), JsonConverter(typeof(SemverVersionConverter))]
  18. public Version GameVersion;
  19. [JsonProperty("author", Required = Required.Always)]
  20. public string Author;
  21. [JsonProperty("dependsOn", Required = Required.DisallowNull, ItemConverterType = typeof(SemverRangeConverter))]
  22. public Dictionary<string, Range> Dependencies = new Dictionary<string, Range>();
  23. [JsonProperty("conflictsWith", Required = Required.DisallowNull, ItemConverterType = typeof(SemverRangeConverter))]
  24. public Dictionary<string, Range> Conflicts = new Dictionary<string, Range>();
  25. [JsonProperty("features", Required = Required.DisallowNull)]
  26. public string[] Features = new string[0];
  27. [JsonProperty("loadBefore", Required = Required.DisallowNull)]
  28. public string[] LoadBefore = new string[0];
  29. [JsonProperty("loadAfter", Required = Required.DisallowNull)]
  30. public string[] LoadAfter = new string[0];
  31. }
  32. }