summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/LogParsing/Models/LogModInfo.cs
blob: 349312df006a6e6da6695eb04fdd31ece9dd9163 (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
#nullable disable

namespace StardewModdingAPI.Web.Framework.LogParsing.Models
{
    /// <summary>Metadata about a mod or content pack in the log.</summary>
    public class LogModInfo
    {
        /*********
        ** Accessors
        *********/
        /// <summary>The mod name.</summary>
        public string Name { get; set; }

        /// <summary>The mod author.</summary>
        public string Author { get; set; }

        /// <summary>The update version.</summary>
        public string UpdateVersion { get; set; }

        /// <summary>The update link.</summary>
        public string UpdateLink { get; set; }

        /// <summary>The mod version.</summary>
        public string Version { get; set; }

        /// <summary>The mod description.</summary>
        public string Description { get; set; }

        /// <summary>The name of the mod for which this is a content pack (if applicable).</summary>
        public string ContentPackFor { get; set; }

        /// <summary>The number of errors logged by this mod.</summary>
        public int Errors { get; set; }

        /// <summary>Whether the mod was loaded into the game.</summary>
        public bool Loaded { get; set; }

        /// <summary>Whether the mod has an update available.</summary>
        public bool HasUpdate => this.UpdateVersion != null && this.Version != this.UpdateVersion;

        /// <summary>Whether the mod is a content pack for another mod.</summary>
        public bool IsContentPack => !string.IsNullOrWhiteSpace(this.ContentPackFor);
    }
}