diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-06-03 19:02:24 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-06-03 19:02:24 -0400 |
commit | 43a9ee42aac1eaf2ff630d164bc425718a531a64 (patch) | |
tree | 07f891a26429d7e31596aad175e9a51e86e4760a /src/SMAPI/Framework | |
parent | 80f882baf3f1854e32df3546fc4d4485c2aab68f (diff) | |
download | SMAPI-43a9ee42aac1eaf2ff630d164bc425718a531a64.tar.gz SMAPI-43a9ee42aac1eaf2ff630d164bc425718a531a64.tar.bz2 SMAPI-43a9ee42aac1eaf2ff630d164bc425718a531a64.zip |
don't prevent mods from accessing game methods/properties extended by SMAPI
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r-- | src/SMAPI/Framework/ModHelpers/ReflectionHelper.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/ModHelpers/ReflectionHelper.cs b/src/SMAPI/Framework/ModHelpers/ReflectionHelper.cs index 86c327ed..916c215d 100644 --- a/src/SMAPI/Framework/ModHelpers/ReflectionHelper.cs +++ b/src/SMAPI/Framework/ModHelpers/ReflectionHelper.cs @@ -122,7 +122,8 @@ namespace StardewModdingAPI.Framework.ModHelpers /// <returns>Returns the same property instance for convenience.</returns> private IReflectedProperty<T> AssertAccessAllowed<T>(IReflectedProperty<T> property) { - this.AssertAccessAllowed(property?.PropertyInfo); + this.AssertAccessAllowed(property?.PropertyInfo.GetMethod?.GetBaseDefinition()); + this.AssertAccessAllowed(property?.PropertyInfo.SetMethod?.GetBaseDefinition()); return property; } @@ -131,7 +132,7 @@ namespace StardewModdingAPI.Framework.ModHelpers /// <returns>Returns the same method instance for convenience.</returns> private IReflectedMethod AssertAccessAllowed(IReflectedMethod method) { - this.AssertAccessAllowed(method?.MethodInfo); + this.AssertAccessAllowed(method?.MethodInfo.GetBaseDefinition()); return method; } |