Skip to content

Commit 281a6df

Browse files
committed
Fixed DragCubeGeneration patch not being applied since I mass regexed the ApplyPatches() methods to follow the new patch declaration syntax (a call to AccessTools.EnumeratorMoveNext() was removed).
1 parent e72c3c1 commit 281a6df

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

KSPCommunityFixes/Performance/DragCubeGeneration.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,13 @@ protected override void ApplyPatches()
7272

7373
AddPatch(PatchType.Prefix, typeof(DragCubeSystem), nameof(DragCubeSystem.RenderProceduralDragCube));
7474

75-
AddPatch(PatchType.Transpiler, typeof(DragCubeSystem), nameof(DragCubeSystem.SetupDragCubeCoroutine), new[] {typeof(Part)}, nameof(DragCubeSystem_SetupDragCubeCoroutine_MoveNextTranspiler));
75+
AddPatch(PatchType.Transpiler,
76+
AccessTools.EnumeratorMoveNext(AccessTools.Method(typeof(DragCubeSystem), nameof(DragCubeSystem.SetupDragCubeCoroutine), new[] { typeof(Part) })),
77+
nameof(DragCubeSystem_SetupDragCubeCoroutine_MoveNextTranspiler));
7678

77-
AddPatch(PatchType.Transpiler, typeof(DragCubeSystem), nameof(DragCubeSystem.SetupDragCubeCoroutine), new[] {typeof(Part), typeof(ConfigNode)}, nameof(DragCubeSystem_SetupDragCubeCoroutine_MoveNextTranspiler));
79+
AddPatch(PatchType.Transpiler,
80+
AccessTools.EnumeratorMoveNext(AccessTools.Method(typeof(DragCubeSystem), nameof(DragCubeSystem.SetupDragCubeCoroutine), new[] { typeof(Part), typeof(ConfigNode) })),
81+
nameof(DragCubeSystem_SetupDragCubeCoroutine_MoveNextTranspiler));
7882

7983
AddPatch(PatchType.Prefix, typeof(ScreenPhysics), nameof(ScreenPhysics.Start));
8084
}

0 commit comments

Comments
 (0)