diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-03-12 01:01:52 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-03-12 01:01:52 -0500 |
commit | 3663f70603fae8ed34e1e0c7500adc2c899312a5 (patch) | |
tree | 4df5bbdee93c16aaa50d3244a8149cc3356f472b /src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2 | |
parent | 95e519796773a2ef17ec482e27cd4403282e2cd1 (diff) | |
download | SMAPI-3663f70603fae8ed34e1e0c7500adc2c899312a5.tar.gz SMAPI-3663f70603fae8ed34e1e0c7500adc2c899312a5.tar.bz2 SMAPI-3663f70603fae8ed34e1e0c7500adc2c899312a5.zip |
split IInstructionFinder from IInstructionRewriter (#247)
Diffstat (limited to 'src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2')
3 files changed, 3 insertions, 3 deletions
diff --git a/src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2/Game1_ActiveClickableMenu_FieldRewriter.cs b/src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2/Game1_ActiveClickableMenu_FieldRewriter.cs index 36634b28..66fe0369 100644 --- a/src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2/Game1_ActiveClickableMenu_FieldRewriter.cs +++ b/src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2/Game1_ActiveClickableMenu_FieldRewriter.cs @@ -18,7 +18,7 @@ namespace StardewModdingAPI.AssemblyRewriters.Rewriters.SDV1_2 /// <param name="instruction">The IL instruction.</param> /// <param name="fieldRef">The field reference.</param> /// <param name="platformChanged">Whether the mod was compiled on a different platform.</param> - protected override bool ShouldRewrite(Instruction instruction, FieldReference fieldRef, bool platformChanged) + protected override bool IsMatch(Instruction instruction, FieldReference fieldRef, bool platformChanged) { return (instruction.OpCode == OpCodes.Ldsfld || instruction.OpCode == OpCodes.Stsfld) // static field diff --git a/src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2/Game1_GameMode_FieldRewriter.cs b/src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2/Game1_GameMode_FieldRewriter.cs index e8cf3d13..9cb6e13d 100644 --- a/src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2/Game1_GameMode_FieldRewriter.cs +++ b/src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2/Game1_GameMode_FieldRewriter.cs @@ -18,7 +18,7 @@ namespace StardewModdingAPI.AssemblyRewriters.Rewriters.SDV1_2 /// <param name="instruction">The IL instruction.</param> /// <param name="fieldRef">The field reference.</param> /// <param name="platformChanged">Whether the mod was compiled on a different platform.</param> - protected override bool ShouldRewrite(Instruction instruction, FieldReference fieldRef, bool platformChanged) + protected override bool IsMatch(Instruction instruction, FieldReference fieldRef, bool platformChanged) { return (instruction.OpCode == OpCodes.Ldsfld || instruction.OpCode == OpCodes.Stsfld) // static field diff --git a/src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2/Game1_Player_FieldRewriter.cs b/src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2/Game1_Player_FieldRewriter.cs index fb87c19a..115e3d7d 100644 --- a/src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2/Game1_Player_FieldRewriter.cs +++ b/src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2/Game1_Player_FieldRewriter.cs @@ -18,7 +18,7 @@ namespace StardewModdingAPI.AssemblyRewriters.Rewriters.SDV1_2 /// <param name="instruction">The IL instruction.</param> /// <param name="fieldRef">The field reference.</param> /// <param name="platformChanged">Whether the mod was compiled on a different platform.</param> - protected override bool ShouldRewrite(Instruction instruction, FieldReference fieldRef, bool platformChanged) + protected override bool IsMatch(Instruction instruction, FieldReference fieldRef, bool platformChanged) { return (instruction.OpCode == OpCodes.Ldsfld || instruction.OpCode == OpCodes.Stsfld) // static field |