mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-09 00:13:36 +08:00
more works
This commit is contained in:
24
UXAssist/ModsCompat/PlanetVeinUtilization.cs
Normal file
24
UXAssist/ModsCompat/PlanetVeinUtilization.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using BepInEx.Bootstrap;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace UXAssist.ModsCompat;
|
||||
|
||||
class PlanetVeinUtilization
|
||||
{
|
||||
public const string PlanetVeinUtilizationGuid = "testpostpleaseignore.dsp.planet_vein_utilization";
|
||||
|
||||
public static bool Run(Harmony harmony)
|
||||
{
|
||||
if (!BepInEx.Bootstrap.Chainloader.PluginInfos.TryGetValue(PlanetVeinUtilizationGuid, out var pluginInfo)) return false;
|
||||
var assembly = pluginInfo.Instance.GetType().Assembly;
|
||||
var classType = assembly.GetType("PlanetVeinUtilization.PlanetVeinUtilization");
|
||||
harmony.Patch(AccessTools.Method(classType, "Awake"),
|
||||
new HarmonyMethod(typeof(PlanetVeinUtilization).GetMethod("PatchPlanetVeinUtilizationAwake")));
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool PatchPlanetVeinUtilizationAwake()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user