-
Notifications
You must be signed in to change notification settings - Fork 0
/
Patch_DysonSphereSegmentRenderer.cs
38 lines (34 loc) · 1.49 KB
/
Patch_DysonSphereSegmentRenderer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using HarmonyLib;
namespace SphereOpt
{
public static class Patch_DysonSphereSegmentRenderer
{
[HarmonyPatch(typeof(DysonSphereSegmentRenderer), "LoadStatic")]
[HarmonyPostfix]
private static void DysonSphereSegmentRenderer_LoadStatic(DysonSphereSegmentRenderer __instance)
{
InstDysonNodeFrameRenderer.SetupBatches();
InstDysonNodeFrameRenderer.SetupLODShader();
}
[HarmonyPatch(typeof(DysonSphereSegmentRenderer), "RebuildModels")]
[HarmonyPostfix]
private static void DysonSphereSegmentRenderer_RebuildModels(DysonSphereSegmentRenderer __instance)
{
InstDysonNodeFrameRenderer.RebuildFrameModels();
}
[HarmonyPatch(typeof(DysonSphereSegmentRenderer), "DrawModels")]
[HarmonyPrefix]
private static bool DysonSphereSegmentRenderer_DrawModels(DysonSphereSegmentRenderer __instance, ERenderPlace place, int editorMask, int gameMask)
{
InstDysonNodeFrameRenderer.Render(__instance, place, editorMask, gameMask);
SphereOpt.getInstDysonShellRendererForSphere(__instance.dysonSphere).RenderShells(place, editorMask, gameMask);
return false;
}
[HarmonyPatch(typeof(DysonSphereSegmentRenderer), "Init")]
[HarmonyPostfix]
private static void DysonSphereSegmentRenderer_Init(DysonSphereSegmentRenderer __instance)
{
InstDysonNodeFrameRenderer.SwitchDSSR(__instance);
}
}
}