mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-09 03:33:29 +08:00
various fixes
This commit is contained in:
@@ -312,6 +312,7 @@ public static class FactoryPatch
|
||||
return;
|
||||
}
|
||||
_beltSignalPatch?.UnpatchSelf();
|
||||
_beltSignalPatch = null;
|
||||
_initialized = false;
|
||||
_signalBelts = null;
|
||||
_signalBeltsCapacity = 0;
|
||||
|
||||
@@ -91,13 +91,16 @@ public class CompressSave : BaseUnityPlugin
|
||||
{
|
||||
PatchUISaveGame.OnDestroy();
|
||||
_patchUISave.UnpatchSelf();
|
||||
_patchUISave = null;
|
||||
}
|
||||
if (_patchUILoad != null)
|
||||
{
|
||||
PatchUILoadGame.OnDestroy();
|
||||
_patchUILoad.UnpatchSelf();
|
||||
_patchUILoad = null;
|
||||
}
|
||||
_patchSave?.UnpatchSelf();
|
||||
_patchSave = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user