1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2026-02-04 17:02:17 +08:00

various fixes

This commit is contained in:
2023-10-15 23:24:57 +08:00
parent d85afccb0d
commit d9ac5e5786
3 changed files with 13 additions and 1 deletions

View File

@@ -100,9 +100,9 @@ public static class DysonSpherePatch
}
else
{
_initialized = false;
_patch?.UnpatchSelf();
_patch = null;
_initialized = false;
_nodeForAbsorb = null;
}
}
@@ -179,6 +179,14 @@ public static class DysonSpherePatch
InitNodeForAbsorb();
}
[HarmonyPostfix]
[HarmonyPatch(typeof(GameMain), nameof(GameMain.End))]
private static void GameMain_End_Postfix()
{
_initialized = false;
_nodeForAbsorb = null;
}
[HarmonyPostfix]
[HarmonyPatch(typeof(DysonNode), nameof(DysonNode.RecalcCpReq))]
private static void DysonNode_RecalcCpReq_Postfix(DysonNode __instance)