1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 03:33:29 +08:00

CheatEnabler 2.0.0

This commit is contained in:
2023-09-14 00:31:26 +08:00
parent 410e473de2
commit f34dcf4f96
5 changed files with 208 additions and 38 deletions

View File

@@ -140,10 +140,9 @@ public static class TechPatch
[HarmonyTranspiler]
[HarmonyPatch(typeof(UITechNode), nameof(UITechNode.OnPointerDown))]
private static IEnumerable<CodeInstruction> UITechNode_OnPointerDown_Transpiler(
IEnumerable<CodeInstruction> instructions)
private static IEnumerable<CodeInstruction> UITechNode_OnPointerDown_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
var matcher = new CodeMatcher(instructions);
var matcher = new CodeMatcher(instructions, generator);
matcher.MatchForward(false,
new CodeMatch(OpCodes.Ldarg_0),
new CodeMatch(OpCodes.Ldfld, AccessTools.Field(typeof(UITechNode), nameof(UITechNode.tree))),