mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
What if we put the sun back after (#744)
## Bug fixes: - Fix the map grid marker under the player/probe/ship being messed up in other star systems
This commit is contained in:
commit
ced3e41bbe
@ -16,13 +16,16 @@ namespace NewHorizons.Handlers
|
|||||||
|
|
||||||
public static void RemoveStockPlanets()
|
public static void RemoveStockPlanets()
|
||||||
{
|
{
|
||||||
// For some reason disabling planets immediately ruins the creation of everything else
|
if (Main.Instance.CurrentStarSystem != "EyeOfTheUniverse")
|
||||||
// However, the sun breaks a lot of stuff sometimes (literally destroys it in its volumes I imagine)
|
{
|
||||||
// Eg, vision torch in Mindscapes
|
// For some reason disabling planets immediately ruins the creation of everything else
|
||||||
// TODO: Fix it better by disabling destruction volumes the first few frames maybe
|
// However, the sun breaks a lot of stuff sometimes (literally destroys it in its volumes I imagine)
|
||||||
// Until then
|
// Eg, vision torch in Mindscapes
|
||||||
// I am become death, the destroyer of worlds
|
// TODO: Fix it better by disabling destruction volumes the first few frames maybe
|
||||||
SearchUtilities.Find("Sun_Body").transform.position = Vector3.left * 1000000000f;
|
// Until then
|
||||||
|
// I am become death, the destroyer of worlds
|
||||||
|
SearchUtilities.Find("Sun_Body").transform.position = Vector3.left * 1000000000f;
|
||||||
|
}
|
||||||
|
|
||||||
// Adapted from EOTS thanks corby
|
// Adapted from EOTS thanks corby
|
||||||
var toDisable = new List<GameObject>();
|
var toDisable = new List<GameObject>();
|
||||||
@ -68,6 +71,9 @@ namespace NewHorizons.Handlers
|
|||||||
{
|
{
|
||||||
StrangerRemoved();
|
StrangerRemoved();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Put it back at the center of the universe after banishing it else there are weird graphical bugs
|
||||||
|
SearchUtilities.Find("Sun_Body").gameObject.transform.position = Locator._centerOfTheUniverse._staticReferenceFrame.transform.position;
|
||||||
}
|
}
|
||||||
|
|
||||||
}, 2); // Have to wait or shit goes wild
|
}, 2); // Have to wait or shit goes wild
|
||||||
|
|||||||
18
NewHorizons/Patches/MapPatches/PlaneOffsetMarkerPatches.cs
Normal file
18
NewHorizons/Patches/MapPatches/PlaneOffsetMarkerPatches.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using HarmonyLib;
|
||||||
|
|
||||||
|
namespace NewHorizons.Patches.MapPatches;
|
||||||
|
|
||||||
|
[HarmonyPatch(typeof(PlaneOffsetMarker))]
|
||||||
|
internal class PlaneOffsetMarkerPatches
|
||||||
|
{
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(nameof(PlaneOffsetMarker.Update))]
|
||||||
|
public static bool PlaneOffsetMarker_Update(PlaneOffsetMarker __instance)
|
||||||
|
{
|
||||||
|
// It tracks the sun originally
|
||||||
|
// Too lazy to perfectly time it getting the right static ref transform so we'll just do this
|
||||||
|
// It disables itself if the ref frame is ever null so don't let it do that bc the ref frame is null when it starts
|
||||||
|
__instance._sunTransform = Locator._centerOfTheUniverse._staticReferenceFrame.transform;
|
||||||
|
return __instance._sunTransform != null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,7 +4,7 @@
|
|||||||
"author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book",
|
"author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book",
|
||||||
"name": "New Horizons",
|
"name": "New Horizons",
|
||||||
"uniqueName": "xen.NewHorizons",
|
"uniqueName": "xen.NewHorizons",
|
||||||
"version": "1.17.2",
|
"version": "1.17.3",
|
||||||
"owmlVersion": "2.9.8",
|
"owmlVersion": "2.9.8",
|
||||||
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
|
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
|
||||||
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],
|
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user