Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ConfigurableToolGroups/Patches/TutorialPatches.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Reflection.Emit;
using System.Reflection;
using System.Reflection.Emit;
using HarmonyLib;

namespace ConfigurableToolGroups.Patches;

Expand Down Expand Up @@ -30,8 +32,7 @@ public static IEnumerable<CodeInstruction> RedirectGTB(IEnumerable<CodeInstructi

yield return new CodeInstruction(
OpCodes.Call,
typeof(TutorialPatches)
.Method(nameof(GetToolButtonByType))
AccessTools.Method(typeof(TutorialPatches), nameof(GetToolButtonByType))
.MakeGenericMethod(genericType)
);
}
Expand Down Expand Up @@ -59,8 +60,7 @@ static IEnumerable<CodeInstruction> TranspileGetToolButton(IEnumerable<CodeInstr
var genericType = mi.GetGenericArguments().First();
yield return new CodeInstruction(
OpCodes.Call,
typeof(TutorialPatches)
.Method(nameof(GetToolButtonByTypeAndPredicate))
AccessTools.Method(typeof(TutorialPatches), nameof(GetToolButtonByTypeAndPredicate))
.MakeGenericMethod(genericType)
);
}
Expand Down