blob: eb312eff8d5fa59b7f12204e059ee50e7d70afda (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
using Newtonsoft.Json;
using StardewModdingAPI.Framework.Serialisation;
namespace StardewModdingAPI.Framework.Models
{
/// <summary>Metadata about a mod version that SMAPI should assume is compatible or broken, regardless of whether it detects incompatible code.</summary>
internal class ModCompatibility
{
/*********
** Accessors
*********/
/****
** From config
****/
/// <summary>The unique mod IDs.</summary>
public string[] ID { get; set; }
/// <summary>The mod name.</summary>
public string Name { get; set; }
/// <summary>The oldest incompatible mod version, or <c>null</c> for all past versions.</summary>
[JsonConverter(typeof(SFieldConverter))]
public ISemanticVersion LowerVersion { get; set; }
/// <summary>The most recent incompatible mod version.</summary>
[JsonConverter(typeof(SFieldConverter))]
public ISemanticVersion UpperVersion { get; set; }
/// <summary>A label to show to the user instead of <see cref="UpperVersion"/>, when the manifest version differs from the user-facing version.</summary>
public string UpperVersionLabel { get; set; }
/// <summary>The URL the user can check for an official updated version.</summary>
public string UpdateUrl { get; set; }
/// <summary>The URL the user can check for an unofficial updated version.</summary>
public string UnofficialUpdateUrl { get; set; }
/// <summary>The reason phrase to show in the warning, or <c>null</c> to use the default value.</summary>
/// <example>"this version is incompatible with the latest version of the game"</example>
public string ReasonPhrase { get; set; }
/// <summary>Indicates how SMAPI should consider the mod.</summary>
public ModCompatibilityType Compatibility { get; set; }
}
}
|