diff --git a/Patches/FixTraderControllerSimulateFalsePatch.cs b/Patches/FixTraderControllerSimulateFalsePatch.cs index df3b855..fbb6322 100644 --- a/Patches/FixTraderControllerSimulateFalsePatch.cs +++ b/Patches/FixTraderControllerSimulateFalsePatch.cs @@ -27,7 +27,12 @@ public class FixTraderControllerSimulateFalsePatch : ModulePatch { if (!__runOriginal) { - return __runOriginal; + // This is a little hairy, as *some* prefix didn't want to run. If MergeConsumables is present, assume it's that. + // If MC succeeded, bail out. If it failed, we might still want to swap + if (Plugin.MergeConsumablesPresent() && __result.Succeeded) + { + return __runOriginal; + } } TargetItemOperation opStruct; diff --git a/Plugin.cs b/Plugin.cs index 4d84df8..0806dac 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -103,4 +103,16 @@ public class Plugin : BaseUnityPlugin return IsFikaPresent.Value; } + + private static bool? IsMergeConsumablesPresent; + + public static bool MergeConsumablesPresent() + { + if (!IsMergeConsumablesPresent.HasValue) + { + IsMergeConsumablesPresent = Chainloader.PluginInfos.ContainsKey("com.lacyway.mc"); + } + + return IsMergeConsumablesPresent.Value; + } }