diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-05-10 11:50:35 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-05-10 11:50:35 -0400 |
commit | 10531e537fda7c4901304b295f4ef60ac1f83eea (patch) | |
tree | da5ecb928b483fda8d55ff7b6733ad29fbb01d8b /src/SMAPI/Framework/ModLoading | |
parent | 1ff09685906b03b46b23e69b7bfe95df24c8184f (diff) | |
download | SMAPI-10531e537fda7c4901304b295f4ef60ac1f83eea.tar.gz SMAPI-10531e537fda7c4901304b295f4ef60ac1f83eea.tar.bz2 SMAPI-10531e537fda7c4901304b295f4ef60ac1f83eea.zip |
rewrite AccessTools methods which changed in Harmony 2.0 (#711)
Diffstat (limited to 'src/SMAPI/Framework/ModLoading')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/Rewriters/MethodParentRewriter.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/ModLoading/Rewriters/MethodParentRewriter.cs b/src/SMAPI/Framework/ModLoading/Rewriters/MethodParentRewriter.cs index c6388295..d0fe8b13 100644 --- a/src/SMAPI/Framework/ModLoading/Rewriters/MethodParentRewriter.cs +++ b/src/SMAPI/Framework/ModLoading/Rewriters/MethodParentRewriter.cs @@ -42,8 +42,9 @@ namespace StardewModdingAPI.Framework.ModLoading.Rewriters /// <param name="fromType">The type whose methods to remap.</param> /// <param name="toType">The type with methods to map to.</param> /// <param name="onlyIfPlatformChanged">Whether to only rewrite references if loading the assembly on a different platform than it was compiled on.</param> - public MethodParentRewriter(Type fromType, Type toType, bool onlyIfPlatformChanged = false) - : this(fromType.FullName, toType, onlyIfPlatformChanged) { } + /// <param name="nounPhrase">A brief noun phrase indicating what the instruction finder matches (or <c>null</c> to generate one).</param> + public MethodParentRewriter(Type fromType, Type toType, bool onlyIfPlatformChanged = false, string nounPhrase = null) + : this(fromType.FullName, toType, onlyIfPlatformChanged, nounPhrase) { } /// <summary>Perform the predefined logic for an instruction if applicable.</summary> |