1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-08 18:53:29 +08:00

minor check

This commit is contained in:
2025-11-11 01:41:06 +08:00
parent 96f160926c
commit af3b46be11

View File

@@ -15,6 +15,8 @@ class BlueprintTweaks
if (!BepInEx.Bootstrap.Chainloader.PluginInfos.TryGetValue(BlueprintTweaksGuid, out var pluginInfo)) return false;
var assembly = pluginInfo.Instance.GetType().Assembly;
var classType = assembly.GetType("BlueprintTweaks.DragRemoveBuildTool");
if (classType == null) return false;
if (AccessTools.Method(classType, "DetermineMorePreviews") != null) return true;
selectObjIdsField = AccessTools.Field(classType, "selectObjIds");
harmony.Patch(AccessTools.Method(classType, "DeterminePreviews"),
new HarmonyMethod(AccessTools.Method(typeof(BlueprintTweaks), nameof(PatchDeterminePreviews))));