From 06491ec9bd6da47bd56baef87d11127b42a29521 Mon Sep 17 00:00:00 2001 From: Joshua Thome Date: Sat, 5 Oct 2024 01:40:15 -0500 Subject: [PATCH] Add comments to dreamworldcontroller patch --- .../EchoesOfTheEyePatches/DreamworldControllerPatches.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NewHorizons/Patches/EchoesOfTheEyePatches/DreamworldControllerPatches.cs b/NewHorizons/Patches/EchoesOfTheEyePatches/DreamworldControllerPatches.cs index 84471b9b..6ee7e21f 100644 --- a/NewHorizons/Patches/EchoesOfTheEyePatches/DreamworldControllerPatches.cs +++ b/NewHorizons/Patches/EchoesOfTheEyePatches/DreamworldControllerPatches.cs @@ -31,6 +31,7 @@ namespace NewHorizons.Patches.EchoesOfTheEyePatches [HarmonyPatch(nameof(DreamWorldController.EnterDreamWorld))] public static void DreamWorldController_EnterDreamWorld(DreamWorldController __instance, DreamCampfire dreamCampfire, DreamArrivalPoint arrivalPoint) { + // Make the body/sector/volume where the player 'wakes up' in the dream match the body where the arrival point is located if it isn't the vanilla DreamWorld, or reset it if it is var dreamWorldAO = Locator.GetAstroObject(AstroObject.Name.DreamWorld); if (arrivalPoint.GetAttachedOWRigidbody() == dreamWorldAO.GetOWRigidbody()) { @@ -46,8 +47,10 @@ namespace NewHorizons.Patches.EchoesOfTheEyePatches __instance._dreamWorldVolume = arrivalAO._gravityVolume.GetOWTriggerVolume(); } + // Make the 'bubble' around the artifact load correctly when the destination body isn't the vanilla DreamWorld __instance._primarySimulationRoot.GetComponent().SetSector(__instance._dreamWorldSector); + // Make the body where the player 'wakes up' out of the dream match the body where the campfire is located if it isn't the Stranger ("RingWorld"), or reset it if it is var ringWorldAO = Locator.GetAstroObject(AstroObject.Name.RingWorld); if (dreamCampfire.GetAttachedOWRigidbody() == ringWorldAO.GetOWRigidbody()) {