mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Merge branch 'dev' of https://github.com/Outer-Wilds-New-Horizons/new-horizons into dev
This commit is contained in:
commit
845c788655
@ -382,7 +382,7 @@ namespace NewHorizons.Builder.Props
|
||||
else if (component is NomaiInterfaceOrb orb)
|
||||
{
|
||||
// detect planet gravity
|
||||
var gravityVolume = planetGO.GetAttachedOWRigidbody().GetAttachedGravityVolume();
|
||||
var gravityVolume = planetGO.GetAttachedOWRigidbody()?.GetAttachedGravityVolume();
|
||||
orb.GetComponent<ConstantForceDetector>()._detectableFields = gravityVolume ? new ForceVolume[] { gravityVolume } : new ForceVolume[] { };
|
||||
}
|
||||
|
||||
|
||||
@ -29,12 +29,22 @@ namespace NewHorizons.Patches.WarpPatches
|
||||
[HarmonyPatch(nameof(VesselWarpController.CheckSystemActivation))]
|
||||
public static void VesselWarpController_CheckSystemActivation(VesselWarpController __instance)
|
||||
{
|
||||
if (Locator.GetEyeStateManager() == null && Main.Instance.CurrentStarSystem != "EyeOfTheUniverse")
|
||||
// Base method only manages the state of the source warp platform blackhole if the EyeStateManager isn't null
|
||||
// However we place the vessel into other systems, so we want to handle the state in those locations as well
|
||||
// For some reason the blackhole can also just be null in which case we ignore all this. Happens in Intervention 1.0.3
|
||||
if (Locator.GetEyeStateManager() == null && Main.Instance.CurrentStarSystem != "EyeOfTheUniverse" && __instance._sourceWarpPlatform._blackHole != null)
|
||||
{
|
||||
if (!__instance._sourceWarpPlatform.IsBlackHoleOpen() && __instance._hasPower && __instance._warpPlatformPowerSlot.IsActivated() && __instance._targetWarpPlatform != null)
|
||||
__instance._sourceWarpPlatform.OpenBlackHole(__instance._targetWarpPlatform, true);
|
||||
else if (__instance._sourceWarpPlatform.IsBlackHoleOpen() && (!__instance._hasPower || !__instance._warpPlatformPowerSlot.IsActivated()))
|
||||
var isBlackHoleOpen = __instance._sourceWarpPlatform.IsBlackHoleOpen();
|
||||
var shouldBlackHoleBeOpen = __instance._hasPower && __instance._warpPlatformPowerSlot.IsActivated() && __instance._targetWarpPlatform != null;
|
||||
|
||||
if (isBlackHoleOpen && !shouldBlackHoleBeOpen)
|
||||
{
|
||||
__instance._sourceWarpPlatform.CloseBlackHole();
|
||||
}
|
||||
else if (!isBlackHoleOpen && shouldBlackHoleBeOpen)
|
||||
{
|
||||
__instance._sourceWarpPlatform.OpenBlackHole(__instance._targetWarpPlatform, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book",
|
||||
"name": "New Horizons",
|
||||
"uniqueName": "xen.NewHorizons",
|
||||
"version": "1.14.6",
|
||||
"version": "1.14.7",
|
||||
"owmlVersion": "2.9.3",
|
||||
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
|
||||
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user