More MergeConsumables compat - allow swap/stack
This commit is contained in:
@@ -26,9 +26,14 @@ public class FixTraderControllerSimulateFalsePatch : ModulePatch
|
||||
bool __runOriginal)
|
||||
{
|
||||
if (!__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;
|
||||
opStruct.targetItem = targetItem;
|
||||
|
12
Plugin.cs
12
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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user