From 3663f70603fae8ed34e1e0c7500adc2c899312a5 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 12 Mar 2017 01:01:52 -0500 Subject: split IInstructionFinder from IInstructionRewriter (#247) --- .../Rewriters/SDV1_2/Game1_ActiveClickableMenu_FieldRewriter.cs | 2 +- .../Rewriters/SDV1_2/Game1_GameMode_FieldRewriter.cs | 2 +- .../Rewriters/SDV1_2/Game1_Player_FieldRewriter.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/StardewModdingAPI.AssemblyRewriters/Rewriters/SDV1_2') 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 /// The IL instruction. /// The field reference. /// Whether the mod was compiled on a different platform. - 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 /// The IL instruction. /// The field reference. /// Whether the mod was compiled on a different platform. - 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 /// The IL instruction. /// The field reference. /// Whether the mod was compiled on a different platform. - 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 -- cgit