fix crashes, temp disable reflection caching, possibly reduce optimization in some areas, likely break 1.5

This commit is contained in:
localavaster
2026-04-14 00:12:50 -06:00
parent 9821c68999
commit 35187cf2d2
20 changed files with 275 additions and 107 deletions
+5 -3
View File
@@ -193,8 +193,6 @@ public abstract class FishPatch : SingletonFactory<FishPatch>, IExposable, IHasD
Patched = true;
foreach (var method in TargetMethodInfos)
{
DebugLog.Message($"Performance Fish is applying {GetType().Name} on {method.FullDescription()}");
try
{
if (IsBenchmarking)
@@ -232,6 +230,7 @@ public abstract class FishPatch : SingletonFactory<FishPatch>, IExposable, IHasD
finalizer: TryMakeHarmonyMethod(FinalizerMethodInfo, FinalizerMethodPriority)));
}
}
}
catch (Exception e)
{
@@ -291,6 +290,9 @@ public abstract class FishPatch : SingletonFactory<FishPatch>, IExposable, IHasD
private MethodInfo? TryGetMethod(string nameCaseInsensitive, Predicate<MethodInfo>? predicate = null)
=> GetType().TryGetMethod(nameCaseInsensitive, predicate);
private static string GetTargetMethodName(MethodBase method)
=> $"{method.DeclaringType?.FullName ?? "<no-type>"}.{method.Name}";
private static int TryGetPriority(MethodInfo? info)
=> info?.TryGetAttribute<HarmonyPriority>()?.info.priority ?? Priority.Normal;
@@ -378,4 +380,4 @@ internal static class Benchmarking
Method = method;
}
}
}
}