Skip to content

Commit

Permalink
Revert "Remove IsNetCoreOnlyMod check from IsLegacyMMCaller"
Browse files Browse the repository at this point in the history
This reverts commit a673aab.
  • Loading branch information
Kalobi committed Jan 27, 2024
1 parent 10aeb77 commit cbe0231
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private static bool IsLegacyMMCaller() {
foreach (StackFrame frame in new StackTrace().GetFrames())
if (frame.HasMethod() && frame.GetMethod()?.DeclaringType?.Assembly is Assembly asm && AssemblyLoadContext.GetLoadContext(asm) is EverestModuleAssemblyContext ctx)
// Check if the mod was relinked from legacy MonoMod
return asm.CustomAttributes.Any(attr => attr.AttributeType == typeof(RelinkedMonoModLegacyAttribute));
return !ctx.ModuleMeta.IsNetCoreOnlyMod || asm.CustomAttributes.Any(attr => attr.AttributeType == typeof(RelinkedMonoModLegacyAttribute));

return false;
}
Expand Down

0 comments on commit cbe0231

Please sign in to comment.