fix harmony patches in plugins
All checks were successful
Build / Compute Version (push) Successful in 5s
Build / Build Nuget package (CringeBootstrap.Abstractions) (push) Successful in 1m53s
Build / Build Nuget package (NuGet) (push) Successful in 2m2s
Build / Build Nuget package (CringePlugins) (push) Successful in 2m49s
Build / Build Launcher (push) Successful in 3m28s
Build / Build Nuget package (SharedCringe) (push) Successful in 4m55s

This commit is contained in:
zznty
2024-11-04 01:05:22 +07:00
parent 010e477ea4
commit a9a203e5a8
2 changed files with 20 additions and 4 deletions

View File

@@ -65,8 +65,9 @@ public static class IntrospectionPatches
{
if (AssemblyLoadContext.GetLoadContext(assembly) is ICoreLoadContext)
return true;
__result = IntrospectionContext.Global.CollectAttributedTypes<HarmonyAttribute>(assembly.GetMainModule())
// static classes are abstract
__result = IntrospectionContext.Global.CollectAttributedTypes<HarmonyAttribute>(assembly.GetMainModule(), true)
.ToArray();
return false;
}