using System; using Newtonsoft.Json; namespace StardewModdingAPI { /// A manifest which describes a mod for SMAPI. public class Manifest { /********* ** Accessors *********/ /// Whether the manifest defined the deprecated field. [JsonIgnore] internal bool UsedAuthourField { get; private set; } /// The mod name. public virtual string Name { get; set; } = ""; /// The mod author's name. public virtual string Author { get; set; } = ""; /// Obsolete. [Obsolete("Use " + nameof(Manifest) + "." + nameof(Manifest.Author) + ".")] public virtual string Authour { get { return this.Author; } set { this.UsedAuthourField = true; this.Author = value; } } /// The mod version. public virtual Version Version { get; set; } = new Version(0, 0, 0, ""); /// A brief description of the mod. public virtual string Description { get; set; } = ""; /// The unique mod ID. public virtual string UniqueID { get; set; } = Guid.NewGuid().ToString(); /// Whether the mod uses per-save config files. [Obsolete("Use " + nameof(Mod) + "." + nameof(Mod.Helper) + "." + nameof(IModHelper.ReadConfig) + " instead")] public virtual bool PerSaveConfigs { get; set; } /// The minimum SMAPI version required by this mod, if any. public string MinimumApiVersion { get; set; } /// The name of the DLL in the directory that has the method. public virtual string EntryDll { get; set; } = ""; } }