mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add comments to dreamworldcontroller patch
This commit is contained in:
parent
fed8bcebeb
commit
06491ec9bd
@ -31,6 +31,7 @@ namespace NewHorizons.Patches.EchoesOfTheEyePatches
|
|||||||
[HarmonyPatch(nameof(DreamWorldController.EnterDreamWorld))]
|
[HarmonyPatch(nameof(DreamWorldController.EnterDreamWorld))]
|
||||||
public static void DreamWorldController_EnterDreamWorld(DreamWorldController __instance, DreamCampfire dreamCampfire, DreamArrivalPoint arrivalPoint)
|
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);
|
var dreamWorldAO = Locator.GetAstroObject(AstroObject.Name.DreamWorld);
|
||||||
if (arrivalPoint.GetAttachedOWRigidbody() == dreamWorldAO.GetOWRigidbody())
|
if (arrivalPoint.GetAttachedOWRigidbody() == dreamWorldAO.GetOWRigidbody())
|
||||||
{
|
{
|
||||||
@ -46,8 +47,10 @@ namespace NewHorizons.Patches.EchoesOfTheEyePatches
|
|||||||
__instance._dreamWorldVolume = arrivalAO._gravityVolume.GetOWTriggerVolume();
|
__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<SectorCullGroup>().SetSector(__instance._dreamWorldSector);
|
__instance._primarySimulationRoot.GetComponent<SectorCullGroup>().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);
|
var ringWorldAO = Locator.GetAstroObject(AstroObject.Name.RingWorld);
|
||||||
if (dreamCampfire.GetAttachedOWRigidbody() == ringWorldAO.GetOWRigidbody())
|
if (dreamCampfire.GetAttachedOWRigidbody() == ringWorldAO.GetOWRigidbody())
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user