summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/Framework')
-rw-r--r--src/StardewModdingAPI/Framework/AssemblyLoader.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Framework/AssemblyLoader.cs b/src/StardewModdingAPI/Framework/AssemblyLoader.cs
index a932a47c..eb5d1cf4 100644
--- a/src/StardewModdingAPI/Framework/AssemblyLoader.cs
+++ b/src/StardewModdingAPI/Framework/AssemblyLoader.cs
@@ -193,7 +193,7 @@ namespace StardewModdingAPI.Framework
foreach (MethodDefinition method in this.GetMethods(module))
{
// skip methods with no rewritable instructions
- bool canRewrite = method.Body.Instructions.Any(op => rewriters.Any(rewriter => rewriter.ShouldRewrite(op, platformChanged)));
+ bool canRewrite = method.Body.Instructions.Any(op => rewriters.Any(rewriter => rewriter.IsMatch(op, platformChanged)));
if (!canRewrite)
continue;
@@ -203,7 +203,7 @@ namespace StardewModdingAPI.Framework
// rewrite instructions
foreach (Instruction op in cil.Body.Instructions.ToArray())
{
- IInstructionRewriter rewriter = rewriters.FirstOrDefault(p => p.ShouldRewrite(op, platformChanged));
+ IInstructionRewriter rewriter = rewriters.FirstOrDefault(p => p.IsMatch(op, platformChanged));
rewriter?.Rewrite(module, cil, op, this.AssemblyMap);
}