summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Content
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-13 22:19:45 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-13 22:19:45 -0400
commitff1b4cd323384d472cb5028529017b52746958c0 (patch)
tree3408a38ded2946b62b957e92c08f9afb9ad5e8b0 /src/SMAPI/Framework/Content
parent3078ae2a8e10294c86f8702769e15da16511ecde (diff)
downloadSMAPI-ff1b4cd323384d472cb5028529017b52746958c0.tar.gz
SMAPI-ff1b4cd323384d472cb5028529017b52746958c0.tar.bz2
SMAPI-ff1b4cd323384d472cb5028529017b52746958c0.zip
remove reflection no longer needed after migration to MonoGame
Diffstat (limited to 'src/SMAPI/Framework/Content')
-rw-r--r--src/SMAPI/Framework/Content/ContentCache.cs10
1 files changed, 3 insertions, 7 deletions
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
****/
/// <summary>Construct an instance.</summary>
- /// <param name="contentManager">The underlying content manager whose cache to manage.</param>
- /// <param name="reflection">Simplifies access to private game code.</param>
- public ContentCache(LocalizedContentManager contentManager, Reflector reflection)
+ /// <param name="loadedAssets">The asset cache for the underlying content manager.</param>
+ public ContentCache(Dictionary<string, object> loadedAssets)
{
- this.Cache = reflection.GetField<Dictionary<string, object>>(contentManager, "loadedAssets").GetValue()
- ?? throw new InvalidOperationException("Can't initialize content cache: required field 'loadedAssets' is missing.");
+ this.Cache = loadedAssets;
}
/****