summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-03-25 13:40:37 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-03-25 13:40:37 -0400
commit2e58f853d27cc200be5b34a1ebef5bbdb7703a49 (patch)
tree450dc06275f595b8ffd9036f69679d06994fc7ed /src/StardewModdingAPI
parentd724f54f32c4de113700fd2173c070d6a992f66e (diff)
downloadSMAPI-2e58f853d27cc200be5b34a1ebef5bbdb7703a49.tar.gz
SMAPI-2e58f853d27cc200be5b34a1ebef5bbdb7703a49.tar.bz2
SMAPI-2e58f853d27cc200be5b34a1ebef5bbdb7703a49.zip
replace field-to-property rewriters with a generic rewriter
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r--src/StardewModdingAPI/Constants.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/StardewModdingAPI/Constants.cs b/src/StardewModdingAPI/Constants.cs
index a7e28213..1965cae3 100644
--- a/src/StardewModdingAPI/Constants.cs
+++ b/src/StardewModdingAPI/Constants.cs
@@ -7,7 +7,6 @@ using Microsoft.Xna.Framework.Graphics;
using StardewModdingAPI.AssemblyRewriters;
using StardewModdingAPI.AssemblyRewriters.Finders;
using StardewModdingAPI.AssemblyRewriters.Rewriters;
-using StardewModdingAPI.AssemblyRewriters.Rewriters.SDV1_2;
using StardewModdingAPI.AssemblyRewriters.Rewriters.Wrappers;
using StardewValley;
@@ -174,12 +173,12 @@ namespace StardewModdingAPI
return new IInstructionRewriter[]
{
// crossplatform
- new GenericMethodMapper(typeof(SpriteBatch), typeof(SpriteBatchWrapper), $"{nameof(SpriteBatch)} methods", onlyIfPlatformChanged: true),
+ new GenericMethodMapper(typeof(SpriteBatch), typeof(SpriteBatchWrapper), onlyIfPlatformChanged: true),
// Stardew Valley 1.2
- new Game1_ActiveClickableMenu_FieldRewriter(),
- new Game1_GameMode_FieldRewriter(),
- new Game1_Player_FieldRewriter()
+ new GenericFieldToPropertyRewriter(typeof(Game1), nameof(Game1.activeClickableMenu)),
+ new GenericFieldToPropertyRewriter(typeof(Game1), nameof(Game1.gameMode)),
+ new GenericFieldToPropertyRewriter(typeof(Game1), nameof(Game1.player))
};
}