Skip to content

Commit

Permalink
fixed broken patches
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddio0141 committed Jan 5, 2025
1 parent bf23825 commit 4a04d92
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private static Exception Cleanup(MethodBase original, Exception ex)
return PatchHelper.CleanupIgnoreFail(original, ex);
}

private static IEnumerable<MethodInfo> TargetMethods()
private static IEnumerable<MethodBase> TargetMethods()
{
foreach (var type in AccessTools.AllTypes())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,12 @@ private static void Prefix(ref object scene)
[HarmonyPatch]
private class ReversePatches
{
private static IEnumerable<MethodInfo> TargetMethods()
private static IEnumerable<MethodBase> TargetMethods()
{
return new[]
{
AccessTools.Method(SceneManager, "Internal_SceneLoaded")
}.Where(x => x != null);
}.Where(x => x != null).Select(MethodBase (x) => x);
}

private static Exception Cleanup(MethodBase original, Exception ex)
Expand Down
4 changes: 2 additions & 2 deletions UniTAS/Patcher/Patches/Harmony/UnityInit/SceneStructPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ private static bool Prefix(int sceneHandle, bool value)
[HarmonyPatch]
private class FixHandleOrReturnDefault
{
private static IEnumerable<MethodInfo> TargetMethods()
private static IEnumerable<MethodBase> TargetMethods()
{
return new[]
{
Expand All @@ -376,7 +376,7 @@ private static IEnumerable<MethodInfo> TargetMethods()
AccessTools.Method(SceneType, "GetLoadingStateInternal"),
AccessTools.Method(SceneType, "GetGUIDInternal"),
AccessTools.Method(SceneType, "SetPathAndGUIDInternal"),
}.Where(x => x != null);
}.Where(x => x != null).Select(MethodBase (x) => x);
}

private static Exception Cleanup(MethodBase original, Exception ex)
Expand Down

0 comments on commit 4a04d92

Please sign in to comment.