rewrite renamed 'prioritiy' field (#711)

This commit is contained in:
Jesse Plamondon-Willard 2020-05-20 02:00:16 -04:00
parent b38b7af054
commit 518bf7e3f1
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
1 changed files with 8 additions and 0 deletions

View File

@ -57,6 +57,14 @@ namespace StardewModdingAPI.Framework.ModLoading.Rewriters
if (this.TryRewriteMethodsToFacade(module, methodRef))
return true;
// rewrite renamed fields
FieldReference fieldRef = RewriteHelper.AsFieldReference(instruction);
if (fieldRef != null)
{
if (fieldRef.DeclaringType.FullName == "HarmonyLib.HarmonyMethod" && fieldRef.Name == "prioritiy")
fieldRef.Name = nameof(HarmonyMethod.priority);
}
return false;
}