From ff1b4cd323384d472cb5028529017b52746958c0 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 13 Apr 2022 22:19:45 -0400 Subject: remove reflection no longer needed after migration to MonoGame --- src/SMAPI/Framework/Content/ContentCache.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/SMAPI/Framework/Content') diff --git a/src/SMAPI/Framework/Content/ContentCache.cs b/src/SMAPI/Framework/Content/ContentCache.cs index d8862eb3..cbb6c1e9 100644 --- a/src/SMAPI/Framework/Content/ContentCache.cs +++ b/src/SMAPI/Framework/Content/ContentCache.cs @@ -3,9 +3,7 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Contracts; using System.Linq; -using StardewModdingAPI.Framework.Reflection; using StardewModdingAPI.Toolkit.Utilities; -using StardewValley; namespace StardewModdingAPI.Framework.Content { @@ -41,12 +39,10 @@ namespace StardewModdingAPI.Framework.Content ** Constructor ****/ /// Construct an instance. - /// The underlying content manager whose cache to manage. - /// Simplifies access to private game code. - public ContentCache(LocalizedContentManager contentManager, Reflector reflection) + /// The asset cache for the underlying content manager. + public ContentCache(Dictionary loadedAssets) { - this.Cache = reflection.GetField>(contentManager, "loadedAssets").GetValue() - ?? throw new InvalidOperationException("Can't initialize content cache: required field 'loadedAssets' is missing."); + this.Cache = loadedAssets; } /**** -- cgit