Skip to content

Commit 0332fa8

Browse files
committed
Let monkeys return false when there's another patch
1 parent c5f8b4b commit 0332fa8

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

CommunityBugFixCollection/BreakDragAndDropCopiedComponentDrives.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
using FrooxEngine;
33
using FrooxEngine.UIX;
44
using HarmonyLib;
5+
using MonkeyLoader;
6+
using MonkeyLoader.Meta;
57
using MonkeyLoader.Resonite;
8+
using NuGet.Versioning;
69
using System;
710
using System.Collections.Generic;
811
using System.Text;
@@ -17,7 +20,21 @@ internal sealed class BreakDragAndDropCopiedComponentDrives : ResoniteMonkey<Bre
1720

1821
public override bool CanBeDisabled => true;
1922

20-
private static bool Prefix(SlotComponentReceiver __instance, IEnumerable<IGrabbable> items, Canvas.InteractionData eventData, in float3 globalPoint, out bool __result)
23+
protected override bool OnEngineReady()
24+
{
25+
var integrationMod = Mod.Loader.Get<Mod>().ById("MonkeyLoader.GamePacks.Resonite");
26+
27+
// Newer version than last one that did not include the fix
28+
if (integrationMod is not null && integrationMod.Version > new NuGetVersion(0, 22, 1))
29+
{
30+
Logger.Info(() => "Skipping in favor of the Resonite Integration fix.");
31+
return false;
32+
}
33+
34+
return base.OnEngineReady();
35+
}
36+
37+
private static bool Prefix(SlotComponentReceiver __instance, IEnumerable<IGrabbable> items, Canvas.InteractionData eventData, out bool __result)
2138
{
2239
__result = false;
2340

CommunityBugFixCollection/CaseInsensitiveCustomGenerics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ protected override bool OnLoaded()
2929
if (Mod.Loader.Get<Mod>().ById("ComponentSelectorAdditions") is not null)
3030
{
3131
Logger.Info(() => "Skipping in favor of the ComponentSelectorAdditions fix.");
32-
return true;
32+
return false;
3333
}
3434

3535
GlobalTypeRegistry._nameToSystemType = new(GlobalTypeRegistry._nameToSystemType, StringComparer.OrdinalIgnoreCase);

0 commit comments

Comments
 (0)