From 569d91b3d3a35d4ba57f73b834111fb9bcffa960 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 03:37:02 +0000 Subject: [PATCH 1/3] Initial plan From 6b474315147dd3e69bb903f7d0a4f9ec69d6facc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 03:40:02 +0000 Subject: [PATCH 2/3] Fix Harmony instance conflict in TorsoMapperFix Co-authored-by: nalathethird <36301692+nalathethird@users.noreply.github.com> --- bHapticsManager/TorsoMapperFix.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bHapticsManager/TorsoMapperFix.cs b/bHapticsManager/TorsoMapperFix.cs index 8668dd1..27f85e1 100644 --- a/bHapticsManager/TorsoMapperFix.cs +++ b/bHapticsManager/TorsoMapperFix.cs @@ -10,8 +10,11 @@ namespace bHapticsManager { public static class TorsoMapperFix { + private static Harmony? _harmonyInstance = null; + public static void ApplyPatches(Harmony harmony) { try { + _harmonyInstance = harmony; harmony.PatchAll(typeof(TorsoMapperFix)); ResoniteMod.Debug("TorsoMapperFix patches applied successfully"); } @@ -28,9 +31,8 @@ public static class CommonAvatarBuilderPatch { static void Postfix(UserRoot userRoot) { try { - if (!_torsoMapperPatchApplied) { - var harmony = new Harmony("com.nalathethird.bHapticsManager.TorsoMapper"); - ApplyTorsoMapperPatch(harmony); + if (!_torsoMapperPatchApplied && TorsoMapperFix._harmonyInstance != null) { + ApplyTorsoMapperPatch(TorsoMapperFix._harmonyInstance); _torsoMapperPatchApplied = true; } } From 0ed960f767788d997d44c96948d059ce1466ddb9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 03:41:22 +0000 Subject: [PATCH 3/3] Change _harmonyInstance to internal for better accessibility Co-authored-by: nalathethird <36301692+nalathethird@users.noreply.github.com> --- bHapticsManager/TorsoMapperFix.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bHapticsManager/TorsoMapperFix.cs b/bHapticsManager/TorsoMapperFix.cs index 27f85e1..e74293b 100644 --- a/bHapticsManager/TorsoMapperFix.cs +++ b/bHapticsManager/TorsoMapperFix.cs @@ -10,7 +10,7 @@ namespace bHapticsManager { public static class TorsoMapperFix { - private static Harmony? _harmonyInstance = null; + internal static Harmony? _harmonyInstance = null; public static void ApplyPatches(Harmony harmony) { try {