diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-09-26 21:08:54 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-09-26 21:08:54 -0400 |
commit | 3c42119c8c0541a4f233e79fe591aa09c79c58cf (patch) | |
tree | b29b7e47fcdb5b864d62d0ffaa101d9fe41d23da /src/StardewModdingAPI/Metadata/InstructionMetadata.cs | |
parent | 83bc6264e44d9b385db819c15892da316955471f (diff) | |
download | SMAPI-3c42119c8c0541a4f233e79fe591aa09c79c58cf.tar.gz SMAPI-3c42119c8c0541a4f233e79fe591aa09c79c58cf.tar.bz2 SMAPI-3c42119c8c0541a4f233e79fe591aa09c79c58cf.zip |
restore AssemblyRewriters assembly for method injection
This fixes a SMAPI 2.0 issue where mods would fail with MethodAccessException if they used SpriteBatch methods that got rewritten for MonoGame/XNA compatibility, because the methods SMAPI injected were internal. Moving it back into a separate assembly lets us make it public without making it visible to modders.
Diffstat (limited to 'src/StardewModdingAPI/Metadata/InstructionMetadata.cs')
-rw-r--r-- | src/StardewModdingAPI/Metadata/InstructionMetadata.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Metadata/InstructionMetadata.cs b/src/StardewModdingAPI/Metadata/InstructionMetadata.cs index 1842d5d8..e8e5411c 100644 --- a/src/StardewModdingAPI/Metadata/InstructionMetadata.cs +++ b/src/StardewModdingAPI/Metadata/InstructionMetadata.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using Microsoft.Xna.Framework.Graphics; +using StardewModdingAPI.AssemblyRewriters; using StardewModdingAPI.Events; using StardewModdingAPI.Framework.ModLoading; using StardewModdingAPI.Framework.ModLoading.Finders; using StardewModdingAPI.Framework.ModLoading.Rewriters; -using StardewModdingAPI.Framework.ModLoading.Rewriters.Wrappers; using StardewValley; namespace StardewModdingAPI.Metadata @@ -79,7 +79,7 @@ namespace StardewModdingAPI.Metadata ** rewrite CIL to fix incompatible code ****/ // crossplatform - new MethodParentRewriter(typeof(SpriteBatch), typeof(SpriteBatchWrapper), onlyIfPlatformChanged: true), + new MethodParentRewriter(typeof(SpriteBatch), typeof(SpriteBatchMethods), onlyIfPlatformChanged: true), // Stardew Valley 1.2 new FieldToPropertyRewriter(typeof(Game1), nameof(Game1.activeClickableMenu)), |