using Newtonsoft.Json;
using StardewModdingAPI.Framework.Serialisation;
namespace StardewModdingAPI.Framework.Models
{
/// Metadata about a mod version that SMAPI should assume is compatible or broken, regardless of whether it detects incompatible code.
internal class ModCompatibility
{
/*********
** Accessors
*********/
/// The unique mod IDs.
[JsonConverter(typeof(SFieldConverter))]
public ModCompatibilityID[] ID { get; set; }
/// The mod name.
public string Name { get; set; }
/// The oldest incompatible mod version, or null for all past versions.
[JsonConverter(typeof(SFieldConverter))]
public ISemanticVersion LowerVersion { get; set; }
/// The most recent incompatible mod version.
[JsonConverter(typeof(SFieldConverter))]
public ISemanticVersion UpperVersion { get; set; }
/// A label to show to the user instead of , when the manifest version differs from the user-facing version.
public string UpperVersionLabel { get; set; }
/// The URLs the user can check for a newer version.
public string[] UpdateUrls { get; set; }
/// The reason phrase to show in the warning, or null to use the default value.
/// "this version is incompatible with the latest version of the game"
public string ReasonPhrase { get; set; }
/// Indicates how SMAPI should consider the mod.
public ModCompatibilityType Compatibility { get; set; } = ModCompatibilityType.AssumeBroken;
}
}