More MergeConsumables compat - allow swap/stack
This commit is contained in:
@@ -27,7 +27,12 @@ public class FixTraderControllerSimulateFalsePatch : ModulePatch
|
|||||||
{
|
{
|
||||||
if (!__runOriginal)
|
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;
|
TargetItemOperation opStruct;
|
||||||
|
12
Plugin.cs
12
Plugin.cs
@@ -103,4 +103,16 @@ public class Plugin : BaseUnityPlugin
|
|||||||
|
|
||||||
return IsFikaPresent.Value;
|
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