summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-05-21 17:29:40 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-05-21 17:29:40 -0400
commit9e7c77f1f4bb9bc244a8227d932a28999b022471 (patch)
tree8fbbcf554847ad8ba9451b3bb29096a430ad85ee /src/StardewModdingAPI
parentc4eb21bd3104c90c4295bd05ec8bf8dc7611f3b1 (diff)
downloadSMAPI-9e7c77f1f4bb9bc244a8227d932a28999b022471.tar.gz
SMAPI-9e7c77f1f4bb9bc244a8227d932a28999b022471.tar.bz2
SMAPI-9e7c77f1f4bb9bc244a8227d932a28999b022471.zip
enable mod dependencies (#285)
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r--src/StardewModdingAPI/Framework/ModLoading/ModResolver.cs4
-rw-r--r--src/StardewModdingAPI/Framework/Models/Manifest.cs2
-rw-r--r--src/StardewModdingAPI/IManifest.cs2
-rw-r--r--src/StardewModdingAPI/Program.cs2
4 files changed, 0 insertions, 10 deletions
diff --git a/src/StardewModdingAPI/Framework/ModLoading/ModResolver.cs b/src/StardewModdingAPI/Framework/ModLoading/ModResolver.cs
index 2c68a639..21aebeb1 100644
--- a/src/StardewModdingAPI/Framework/ModLoading/ModResolver.cs
+++ b/src/StardewModdingAPI/Framework/ModLoading/ModResolver.cs
@@ -126,7 +126,6 @@ namespace StardewModdingAPI.Framework.ModLoading
}
}
-#if EXPERIMENTAL
/// <summary>Sort the given mods by the order they should be loaded.</summary>
/// <param name="mods">The mods to process.</param>
public IEnumerable<IModMetadata> ProcessDependencies(IEnumerable<IModMetadata> mods)
@@ -149,13 +148,11 @@ namespace StardewModdingAPI.Framework.ModLoading
return sortedMods.Reverse();
}
-#endif
/*********
** Private methods
*********/
-#if EXPERIMENTAL
/// <summary>Sort a mod's dependencies by the order they should be loaded, and remove any mods that can't be loaded due to missing or conflicting dependencies.</summary>
/// <param name="mods">The full list of mods being validated.</param>
/// <param name="mod">The mod whose dependencies to process.</param>
@@ -270,7 +267,6 @@ namespace StardewModdingAPI.Framework.ModLoading
return states[mod] = ModDependencyStatus.Sorted;
}
}
-#endif
/// <summary>Get all mod folders in a root folder, passing through empty folders as needed.</summary>
/// <param name="rootPath">The root folder path to search.</param>
diff --git a/src/StardewModdingAPI/Framework/Models/Manifest.cs b/src/StardewModdingAPI/Framework/Models/Manifest.cs
index 53384852..be781585 100644
--- a/src/StardewModdingAPI/Framework/Models/Manifest.cs
+++ b/src/StardewModdingAPI/Framework/Models/Manifest.cs
@@ -30,11 +30,9 @@ 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; }
-#if EXPERIMENTAL
/// <summary>The other mods that must be loaded before this mod.</summary>
[JsonConverter(typeof(ManifestFieldConverter))]
public IManifestDependency[] Dependencies { get; set; }
-#endif
/// <summary>The unique mod ID.</summary>
public string UniqueID { get; set; }
diff --git a/src/StardewModdingAPI/IManifest.cs b/src/StardewModdingAPI/IManifest.cs
index c036fdd3..9533aadb 100644
--- a/src/StardewModdingAPI/IManifest.cs
+++ b/src/StardewModdingAPI/IManifest.cs
@@ -29,10 +29,8 @@ namespace StardewModdingAPI
/// <summary>The name of the DLL in the directory that has the <see cref="Mod.Entry"/> method.</summary>
string EntryDll { get; }
-#if EXPERIMENTAL
/// <summary>The other mods that must be loaded before this mod.</summary>
IManifestDependency[] Dependencies { get; }
-#endif
/// <summary>Any manifest fields which didn't match a valid field.</summary>
IDictionary<string, object> ExtraFields { get; }
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index 21717cc3..4df63456 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -402,10 +402,8 @@ namespace StardewModdingAPI
}
}
-#if EXPERIMENTAL
// process dependencies
mods = resolver.ProcessDependencies(mods).ToArray();
-#endif
// load mods
modsLoaded = this.LoadMods(mods, new JsonHelper(), (SContentManager)Game1.content, deprecationWarnings);