From 85a8959e97e90b30ac8291904838e18f102e97c2 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 21 Oct 2017 21:51:48 -0400 Subject: [PATCH] fix mods which implement IAssetLoader being marked as conflicting with themselves --- docs/release-notes.md | 1 + src/SMAPI/Framework/SContentManager.cs | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 285d9df3..e4b2bccd 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -6,6 +6,7 @@ * For modders: * The reflection API now works with public code to simplify mod integrations. * Fixed `e.SuppressButton()` in input events not correctly suppressing keyboard buttons. + * Fixed mods which implement `IAssetLoader` directly not being allowed to load files due to incorrect conflict detection. ## 2.0 ### Release highlights diff --git a/src/SMAPI/Framework/SContentManager.cs b/src/SMAPI/Framework/SContentManager.cs index db202567..2f5d104f 100644 --- a/src/SMAPI/Framework/SContentManager.cs +++ b/src/SMAPI/Framework/SContentManager.cs @@ -510,16 +510,12 @@ namespace StardewModdingAPI.Framework { foreach (var entry in entries) { - IModMetadata metadata = entry.Key; + IModMetadata mod = entry.Key; IList interceptors = entry.Value; - // special case if mod is an interceptor - if (metadata.Mod is T modAsInterceptor) - yield return new KeyValuePair(metadata, modAsInterceptor); - // registered editors foreach (T interceptor in interceptors) - yield return new KeyValuePair(metadata, interceptor); + yield return new KeyValuePair(mod, interceptor); } }