diff --git a/NewHorizons/Builder/Body/ProxyBuilder.cs b/NewHorizons/Builder/Body/ProxyBuilder.cs index 077a4f8f..29edfc26 100644 --- a/NewHorizons/Builder/Body/ProxyBuilder.cs +++ b/NewHorizons/Builder/Body/ProxyBuilder.cs @@ -161,10 +161,8 @@ namespace NewHorizons.Builder.Body } // Remove all collisions if there are any - foreach (var col in newProxy.GetComponentsInChildren()) - { - GameObject.Destroy(col); - } + foreach (var col in newProxy.GetComponentsInChildren()) GameObject.Destroy(col); + foreach (var col in newProxy.GetComponentsInChildren()) GameObject.Destroy(col); foreach (var renderer in newProxy.GetComponentsInChildren()) { diff --git a/NewHorizons/Patches/ProxyBodyPatches.cs b/NewHorizons/Patches/ProxyBodyPatches.cs index 804c6682..af5a391f 100644 --- a/NewHorizons/Patches/ProxyBodyPatches.cs +++ b/NewHorizons/Patches/ProxyBodyPatches.cs @@ -9,49 +9,6 @@ namespace NewHorizons.Patches [HarmonyPatch] public static class ProxyBodyPatches { - [HarmonyPrefix] - [HarmonyPatch(typeof(ProxyBody), nameof(ProxyBody.Awake))] - public static void ProxyBody_Awake(ProxyBody __instance) - { - // Mobius rly used the wrong event name - GlobalMessenger.AddListener("EnterMapView", __instance.OnEnterMapView); - GlobalMessenger.AddListener("ExitMapView", __instance.OnExitMapView); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ProxyBody), nameof(ProxyBody.OnDestroy))] - public static void ProxyBody_OnDestroy(ProxyBody __instance) - { - GlobalMessenger.RemoveListener("EnterMapView", __instance.OnEnterMapView); - GlobalMessenger.RemoveListener("ExitMapView", __instance.OnExitMapView); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ProxyBody), nameof(ProxyBody.OnEnterMapView))] - public static void ProxyBody_OnEnterMapView(ProxyBody __instance) - { - // Set this to false before the method sets the rendering to false so it matches - __instance._outOfRange = false; - } - - // Mobius why doesn't ProxyOrbiter inherit from ProxyBody - [HarmonyPrefix] - [HarmonyPatch(typeof(ProxyOrbiter), nameof(ProxyOrbiter.Awake))] - public static void ProxyOrbiter_Awake(ProxyOrbiter __instance) - { - // Mobius rly used the wrong event name - GlobalMessenger.AddListener("EnterMapView", __instance.OnEnterMapView); - GlobalMessenger.AddListener("ExitMapView", __instance.OnExitMapView); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ProxyOrbiter), nameof(ProxyOrbiter.OnDestroy))] - public static void ProxyOrbiter_OnDestroy(ProxyOrbiter __instance) - { - GlobalMessenger.RemoveListener("EnterMapView", __instance.OnEnterMapView); - GlobalMessenger.RemoveListener("ExitMapView", __instance.OnExitMapView); - } - [HarmonyReversePatch] [HarmonyPatch(typeof(ProxyPlanet), nameof(ProxyPlanet.Initialize))] [MethodImpl(MethodImplOptions.NoInlining)] diff --git a/NewHorizons/manifest.json b/NewHorizons/manifest.json index 98464e2b..79681373 100644 --- a/NewHorizons/manifest.json +++ b/NewHorizons/manifest.json @@ -6,6 +6,7 @@ "uniqueName": "xen.NewHorizons", "version": "1.4.4", "owmlVersion": "2.6.0", + "dependencies": [ "JohnCorby.VanillaFix" ], "conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_Randomizer" ], "pathsToPreserve": [ "planets", "systems", "translations" ] }