1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 14:13:31 +08:00

More works

This commit is contained in:
2024-08-25 14:41:17 +08:00
parent f84d20544c
commit 054b8e14b8
12 changed files with 310 additions and 211 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Reflection.Emit;
using BepInEx.Configuration;
using HarmonyLib;
using UXAssist.Common;
namespace CheatEnabler;
@@ -113,9 +114,11 @@ public static class DysonSpherePatch
UpdateSailLifeTime();
UpdateSailsCacheForThisGame();
_patch ??= Harmony.CreateAndPatchAll(typeof(SkipBulletPatch));
GameLogic.OnGameEnd += GameMain_Begin_Postfix;
}
else
{
GameLogic.OnGameEnd -= GameMain_Begin_Postfix;
_patch?.UnpatchSelf();
_patch = null;
}
@@ -151,8 +154,6 @@ public static class DysonSpherePatch
_sailsCacheCapacity[index] = capacity;
}
[HarmonyPostfix]
[HarmonyPatch(typeof(GameMain), nameof(GameMain.Begin))]
private static void GameMain_Begin_Postfix()
{
UpdateSailsCacheForThisGame();