diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-20 00:58:03 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-20 00:58:03 -0400 |
commit | 933e889c24e565d9028d3719ba2d65d512890564 (patch) | |
tree | cd02f439137bc1e9f67011bb0be7021e0b497dae /src/StardewModdingAPI/Framework/ModRegistry.cs | |
parent | 16281fb58944e7e829b184b014e27822c91c9f43 (diff) | |
parent | ca44c3f329f3a63e5cabad0b6838e24612bd0c49 (diff) | |
download | SMAPI-933e889c24e565d9028d3719ba2d65d512890564.tar.gz SMAPI-933e889c24e565d9028d3719ba2d65d512890564.tar.bz2 SMAPI-933e889c24e565d9028d3719ba2d65d512890564.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/StardewModdingAPI/Framework/ModRegistry.cs')
-rw-r--r-- | src/StardewModdingAPI/Framework/ModRegistry.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/StardewModdingAPI/Framework/ModRegistry.cs b/src/StardewModdingAPI/Framework/ModRegistry.cs index 3899aa3f..62063fbd 100644 --- a/src/StardewModdingAPI/Framework/ModRegistry.cs +++ b/src/StardewModdingAPI/Framework/ModRegistry.cs @@ -13,7 +13,7 @@ namespace StardewModdingAPI.Framework ** Properties *********/ /// <summary>The registered mod data.</summary> - private readonly List<IMod> Mods = new List<IMod>(); + private readonly List<IModMetadata> Mods = new List<IModMetadata>(); /// <summary>The friendly mod names treated as deprecation warning sources (assembly full name => mod name).</summary> private readonly IDictionary<string, string> ModNamesByAssembly = new Dictionary<string, string>(); @@ -28,7 +28,7 @@ namespace StardewModdingAPI.Framework /// <summary>Get metadata for all loaded mods.</summary> public IEnumerable<IManifest> GetAll() { - return this.Mods.Select(p => p.ModManifest); + return this.Mods.Select(p => p.Manifest); } /// <summary>Get metadata for a loaded mod.</summary> @@ -50,15 +50,15 @@ namespace StardewModdingAPI.Framework ** Internal methods ****/ /// <summary>Register a mod as a possible source of deprecation warnings.</summary> - /// <param name="mod">The mod instance.</param> - public void Add(IMod mod) + /// <param name="metadata">The mod metadata.</param> + public void Add(IModMetadata metadata) { - this.Mods.Add(mod); - this.ModNamesByAssembly[mod.GetType().Assembly.FullName] = mod.ModManifest.Name; + this.Mods.Add(metadata); + this.ModNamesByAssembly[metadata.Mod.GetType().Assembly.FullName] = metadata.DisplayName; } /// <summary>Get all enabled mods.</summary> - public IEnumerable<IMod> GetMods() + public IEnumerable<IModMetadata> GetMods() { return (from mod in this.Mods select mod); } |