mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-08-05 15:30:18 +08:00
refactor: phase 5 transpiler docs, mod-compat helpers, and build quality gates
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using HarmonyLib;
|
||||
using UXAssist.Common.ModCompat;
|
||||
|
||||
namespace UXAssist.ModsCompat;
|
||||
|
||||
@@ -8,9 +9,8 @@ class PlanetVeinUtilization
|
||||
|
||||
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");
|
||||
if (!ModCompatHelper.TryGetLoadedPluginInfo(PlanetVeinUtilizationGuid, out var pluginInfo)) return false;
|
||||
if (!ModCompatHelper.TryGetPluginType(pluginInfo, "PlanetVeinUtilization.PlanetVeinUtilization", out var classType)) return false;
|
||||
harmony.Patch(AccessTools.Method(classType, "Awake"),
|
||||
new HarmonyMethod(typeof(PlanetVeinUtilization).GetMethod("PatchPlanetVeinUtilizationAwake")));
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user