using System;
using Newtonsoft.Json;
namespace StardewModdingAPI
{
/// Wraps so it can implement without breaking backwards compatibility.
[Obsolete("Use " + nameof(IManifest) + " or " + nameof(Mod) + "." + nameof(Mod.ModManifest) + " instead")]
internal class ManifestImpl : Manifest, IManifest
{
/// The mod version.
public new ISemanticVersion Version
{
get { return base.Version; }
set { base.Version = (Version)value; }
}
}
/// A manifest which describes a mod for SMAPI.
public class Manifest
{
/*********
** Accessors
*********/
/// The mod name.
public string Name { get; set; }
/// A brief description of the mod.
public string Description { get; set; }
/// The mod author's name.
public string Author { get; set; }
/// The mod version.
public Version Version { get; set; } = new Version(0, 0, 0, "", suppressDeprecationWarning: true);
/// 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 string EntryDll { get; set; }
/// The unique mod ID.
public string UniqueID { get; set; }
/****
** Obsolete
****/
/// Whether the manifest defined the deprecated field.
[JsonIgnore]
internal bool UsedAuthourField { get; private set; }
/// Obsolete.
[Obsolete("Use " + nameof(Manifest) + "." + nameof(Manifest.Author) + ".")]
public virtual string Authour
{
get { return this.Author; }
set
{
this.UsedAuthourField = true;
this.Author = value;
}
}
/// Whether the mod uses per-save config files.
[Obsolete("Use " + nameof(Mod) + "." + nameof(Mod.Helper) + "." + nameof(IModHelper.ReadConfig) + " instead")]
public bool PerSaveConfigs { get; set; }
}
}