summaryrefslogtreecommitdiff
path: root/src/SMAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-03-29 18:59:05 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-06-10 00:04:24 -0400
commitb6a8dcdd46dbc2875b24e0f77049c61a5cf398d9 (patch)
tree47b710057e8ff344a2d74f58fcf40834aa8ec786 /src/SMAPI
parentdb578c389e35ee026ed4ea12dfdcef99f8bc3b28 (diff)
downloadSMAPI-b6a8dcdd46dbc2875b24e0f77049c61a5cf398d9.tar.gz
SMAPI-b6a8dcdd46dbc2875b24e0f77049c61a5cf398d9.tar.bz2
SMAPI-b6a8dcdd46dbc2875b24e0f77049c61a5cf398d9.zip
update to Harmony 2.2.1
Diffstat (limited to 'src/SMAPI')
-rw-r--r--src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs25
-rw-r--r--src/SMAPI/SMAPI.csproj2
2 files changed, 1 insertions, 26 deletions
diff --git a/src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs b/src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs
index b5fc1f57..1fcda077 100644
--- a/src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs
+++ b/src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs
@@ -27,15 +27,6 @@ namespace MonoMod.Utils
private static readonly object[] _NoArgs = Array.Empty<object>();
private static readonly object?[] _CacheGetterArgs = { /* MemberListType.All */ 0, /* name apparently always null? */ null };
- private static readonly Type? t_RuntimeModule =
- typeof(Module).Assembly
- .GetType("System.Reflection.RuntimeModule");
-
- private static readonly PropertyInfo? p_RuntimeModule_RuntimeType =
- typeof(Module).Assembly
- .GetType("System.Reflection.RuntimeModule")
- ?.GetProperty("RuntimeType", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
-
private static readonly Type? t_RuntimeType =
typeof(Type).Assembly
.GetType("System.RuntimeType");
@@ -109,22 +100,6 @@ namespace MonoMod.Utils
}
}
- public static Type? GetModuleType(this Module? module)
- {
- // Sadly we can't blindly resolve type 0x02000001 as the runtime throws ArgumentException.
-
- if (module == null || t_RuntimeModule == null || !t_RuntimeModule.IsInstanceOfType(module))
- return null;
-
- // .NET
- if (p_RuntimeModule_RuntimeType != null)
- return (Type?)p_RuntimeModule_RuntimeType.GetValue(module, _NoArgs);
-
- // The hotfix doesn't apply to Mono anyway, thus that's not copied over.
-
- return null;
- }
-
public static Type? GetRealDeclaringType(this MemberInfo member)
{
return member.DeclaringType ?? member.Module.GetModuleType();
diff --git a/src/SMAPI/SMAPI.csproj b/src/SMAPI/SMAPI.csproj
index 91e4c668..5bc12429 100644
--- a/src/SMAPI/SMAPI.csproj
+++ b/src/SMAPI/SMAPI.csproj
@@ -23,7 +23,7 @@
<ItemGroup>
<PackageReference Include="LargeAddressAware" Version="1.0.5" />
<PackageReference Include="Mono.Cecil" Version="0.11.4" />
- <PackageReference Include="MonoMod.Common" Version="21.6.21.1" />
+ <PackageReference Include="MonoMod.Common" Version="22.3.5.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Pintail" Version="2.1.0" />
<PackageReference Include="Platonymous.TMXTile" Version="1.5.9" />