mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-09 03:33:29 +08:00
More works
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using BepInEx.Configuration;
|
||||
using HarmonyLib;
|
||||
using UXAssist.Common;
|
||||
|
||||
namespace UniverseGenTweaks;
|
||||
public static class BirthPlanetPatch
|
||||
@@ -73,15 +74,16 @@ public static class BirthPlanetPatch
|
||||
HighLuminosityBirthStar.SettingChanged += (_, _) => PatchBirthThemeData();
|
||||
PatchBirthThemeData();
|
||||
_patch ??= Harmony.CreateAndPatchAll(typeof(BirthPlanetPatch));
|
||||
GameLogic.OnDataLoaded += VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
||||
}
|
||||
|
||||
public static void Uninit()
|
||||
{
|
||||
GameLogic.OnDataLoaded -= VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
||||
_patch?.UnpatchSelf();
|
||||
_patch = null;
|
||||
}
|
||||
|
||||
[HarmonyPostfix, HarmonyPatch(typeof(VFPreload), "InvokeOnLoadWorkEnded")]
|
||||
private static void VFPreload_InvokeOnLoadWorkEnded_Postfix()
|
||||
{
|
||||
PatchBirthThemeData();
|
||||
|
||||
Reference in New Issue
Block a user