summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Networking/MultiplayerPeerMod.cs
blob: 1b324bcd6bbb5ef59aea8a37610ba0b6018b8c03 (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
namespace StardewModdingAPI.Framework.Networking
{
    internal class MultiplayerPeerMod : IMultiplayerPeerMod
    {
        /*********
        ** Accessors
        *********/
        /// <summary>The mod's display name.</summary>
        public string Name { get; }

        /// <summary>The unique mod ID.</summary>
        public string ID { get; }

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


        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="mod">The mod metadata.</param>
        public MultiplayerPeerMod(RemoteContextModModel mod)
        {
            this.Name = mod.Name;
            this.ID = mod.ID?.Trim();
            this.Version = mod.Version;
        }
    }
}