From 3da27346c6886fff4afb35d7fb46345c92ef1197 Mon Sep 17 00:00:00 2001
From: Jesse Plamondon-Willard <github@jplamondonw.com>
Date: Fri, 12 May 2017 01:15:02 -0400
Subject: add basic dependencies to manifest (#285)

---
 src/StardewModdingAPI/Framework/Models/Manifest.cs |  6 +++++-
 .../Framework/Models/ManifestDependency.cs         | 23 ++++++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 src/StardewModdingAPI/Framework/Models/ManifestDependency.cs

(limited to 'src/StardewModdingAPI/Framework/Models')

diff --git a/src/StardewModdingAPI/Framework/Models/Manifest.cs b/src/StardewModdingAPI/Framework/Models/Manifest.cs
index 79be2075..be781585 100644
--- a/src/StardewModdingAPI/Framework/Models/Manifest.cs
+++ b/src/StardewModdingAPI/Framework/Models/Manifest.cs
@@ -21,7 +21,7 @@ namespace StardewModdingAPI.Framework.Models
         public string Author { get; set; }
 
         /// <summary>The mod version.</summary>
-        [JsonConverter(typeof(SemanticVersionConverter))]
+        [JsonConverter(typeof(ManifestFieldConverter))]
         public ISemanticVersion Version { get; set; }
 
         /// <summary>The minimum SMAPI version required by this mod, if any.</summary>
@@ -30,6 +30,10 @@ namespace StardewModdingAPI.Framework.Models
         /// <summary>The name of the DLL in the directory that has the <see cref="Mod.Entry"/> method.</summary>
         public string EntryDll { get; set; }
 
+        /// <summary>The other mods that must be loaded before this mod.</summary>
+        [JsonConverter(typeof(ManifestFieldConverter))]
+        public IManifestDependency[] Dependencies { get; set; }
+
         /// <summary>The unique mod ID.</summary>
         public string UniqueID { get; set; }
 
diff --git a/src/StardewModdingAPI/Framework/Models/ManifestDependency.cs b/src/StardewModdingAPI/Framework/Models/ManifestDependency.cs
new file mode 100644
index 00000000..2f580c1d
--- /dev/null
+++ b/src/StardewModdingAPI/Framework/Models/ManifestDependency.cs
@@ -0,0 +1,23 @@
+namespace StardewModdingAPI.Framework.Models
+{
+    /// <summary>A mod dependency listed in a mod manifest.</summary>
+    internal class ManifestDependency : IManifestDependency
+    {
+        /*********
+        ** Accessors
+        *********/
+        /// <summary>The unique mod ID to require.</summary>
+        public string UniqueID { get; set; }
+
+
+        /*********
+        ** Public methods
+        *********/
+        /// <summary>Construct an instance.</summary>
+        /// <param name="uniqueID">The unique mod ID to require.</param>
+        public ManifestDependency(string uniqueID)
+        {
+            this.UniqueID = uniqueID;
+        }
+    }
+}
-- 
cgit