From 4c115e50fd875d634ce64c77c7835753ee89e90a Mon Sep 17 00:00:00 2001 From: muerterico Date: Tue, 15 Aug 2023 01:05:36 +0500 Subject: [PATCH] v1.1.7 - fixed infinite loadig bug - fixed ATP error --- TheVision.cs | 17 ++++++++---- manifest.json | 2 +- planets/GloamingGalaxy/Cron.json | 45 ++++++++++++-------------------- systems/GloamingGalaxy.json | 25 ++++++++---------- 4 files changed, 41 insertions(+), 48 deletions(-) diff --git a/TheVision.cs b/TheVision.cs index 386eb8d..ecb6c2a 100644 --- a/TheVision.cs +++ b/TheVision.cs @@ -20,6 +20,7 @@ public class TheVision : ModBehaviour public static INewHorizons newHorizonsAPI; public static TheVision Instance; public OWAudioSource PlayerHeadsetAudioSource; + public bool isAtpFixNeeded = false; private void Awake() { @@ -27,7 +28,7 @@ private void Awake() Harmony.CreateAndPatchAll(System.Reflection.Assembly.GetExecutingAssembly()); } - private void Start() + public void Start() { ModHelper.Events.Unity.RunWhen(() => EntitlementsManager.IsDlcOwned() != EntitlementsManager.AsyncOwnershipStatus.NotReady, () => { @@ -69,13 +70,14 @@ private void TitleProps() SearchUtilities.Find("Scene/Background/PlanetPivot/Prefab_HEA_Campfire/Props_HEA_Campfire/Campfire_Flames").GetComponent().material.color = new Color(0, 5, 4, 1); SearchUtilities.Find("Scene/Background/PlanetPivot/Prefab_HEA_Campfire/Props_HEA_Campfire/Campfire_Embers").SetActive(false); } - private void OnStarSystemLoaded(string systemName) + public void OnStarSystemLoaded(string systemName) { ModHelper.Console.WriteLine("LOADED SYSTEM " + systemName); if (systemName == "SolarSystem") { - SpawnStartProps(); + SpawnStartProps(); + isAtpFixNeeded = true; } if (systemName == "EyeOfTheUniverse") { @@ -83,7 +85,9 @@ private void OnStarSystemLoaded(string systemName) } if (systemName == "GloamingGalaxy") { + isAtpFixNeeded = false; EndGame(); + } } private void SpawnStartProps() @@ -299,6 +303,7 @@ private void SpawnStartProps() public void ATPfix() { + // ATP memory animation link fix var dataStream = SearchUtilities.Find("TimeLoopRing_Body/Effects_TimeLoopRing/Effect 2/Effects_NOM_TimeLoopDataStream"); dataStream.transform.localRotation = new Quaternion(0.8899f, 0, 0, 0.4562f); @@ -309,9 +314,10 @@ public void ATPfix() newMask.transform.localPosition = new Vector3(22.217f, -6.8984f, 5.1757f); newMask.SetActive(false); - var checkOtherPulse = SearchUtilities.Find("TimeLoopRing_Body/Effects_TimeLoopRing/centralPulse 1"); + var checkOtherPulse = SearchUtilities.Find("TimeLoopRing_Body/Effects_TimeLoopRing/centralPulse 1"); + - TheVision.Instance.ModHelper.Events.Unity.RunWhen(() => checkOtherPulse.gameObject.activeSelf == true, () => + TheVision.Instance.ModHelper.Events.Unity.RunWhen(() => isAtpFixNeeded != false && checkOtherPulse != null && checkOtherPulse.gameObject.activeSelf == true , () => { dataStream.SetActive(true); newMask.SetActive(true); @@ -655,6 +661,7 @@ public void DisabledPropsOnStart(bool isActive) } public void EndGame() { + isAtpFixNeeded = false; /* ModHelper.Events.Unity.FireOnNextUpdate(() => { diff --git a/manifest.json b/manifest.json index c145702..ac4788c 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "author": "hearth1an", "name": "The Vision", "uniqueName": "hearth1an.TheVision", - "version": "1.1.6", + "version": "1.1.7", "owmlVersion": "2.3.2", "dependencies": [ "xen.NewHorizons", "JohnCorby.VanillaFix" ], "conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_Randomizer" ] diff --git a/planets/GloamingGalaxy/Cron.json b/planets/GloamingGalaxy/Cron.json index 47eaa8e..4b299f4 100644 --- a/planets/GloamingGalaxy/Cron.json +++ b/planets/GloamingGalaxy/Cron.json @@ -4,17 +4,18 @@ "starSystem": "GloamingGalaxy", "Base": { - "surfaceGravity": 100, - "surfaceSize": 5000, - "hasMapMarker": true, + "surfaceSize": 1000, "gravityFallOff": "inverseSquared", - "centerOfSolarSystem": true - + "centerOfSolarSystem": true, + "groundSize": 500 }, + "Orbit": { "isStatic": true + }, + "Atmosphere": { "size": 5000, "fogTint": { @@ -26,38 +27,26 @@ "fogDensity": 0.4, "fogSize": 5500 }, - "Star": { - "size": 5000, - "lightRadius": 500000, - "tint": { - "r": 0, - "g": 0, - "b": 0, - "a": 0 - }, - "lightTint": { - "r": 0, - "g": 0, - "b": 0, - "a": 0 - }, - "solarLuminosity": 1, - "goSupernova": true - - + "Spawn": { + "playerSpawn": { + "position": { "y": 20 }, + "startWithSuit": true + } + }, + "Volumes": { "creditsVolume": [ { "creditsType": "fast", "position": { - "x": 0, - "y": 0, - "z": 0 + "x": 1000, + "y": 1000, + "z": 1000 }, "radius": 100000, "gameOverText": "THE_VISION_TO_BE_CONTINUED", - + "deathType": "blackHole", "rename": "Death_Trigger" } diff --git a/systems/GloamingGalaxy.json b/systems/GloamingGalaxy.json index 06a40b4..b982fdd 100644 --- a/systems/GloamingGalaxy.json +++ b/systems/GloamingGalaxy.json @@ -1,17 +1,14 @@ { - "$schema": "https://raw.githubusercontent.com/xen-42/outer-wilds-new-horizons/main/NewHorizons/Schemas/star_system_schema.json", - "Vessel": { - "coords": { - "x": [ 5, 0, 1, 2, 4 ], - "y": [ 4, 0, 2, 3, 5 ], - "z": [ 1, 4, 0, 5, 2 ] + "$schema": "https://raw.githubusercontent.com/xen-42/outer-wilds-new-horizons/main/NewHorizons/Schemas/star_system_schema.json", + "Vessel": { + "coords": { + "x": [ 5, 0, 1, 2, 4 ], + "y": [ 4, 0, 2, 3, 5 ], + "z": [ 1, 4, 0, 5, 2 ] + }, + "promptFact": "HOLOGRAM_CHANGED" }, - "vesselPosition": { - "x": 0, - "y": 0, - "z": 8000 - }, - "promptFact": "HOLOGRAM_CHANGED" - }, - "canEnterViaWarpDrive": false + "destroyStockPlanets": false, + "enableTimeLoop": false, + "canEnterViaWarpDrive": false } \ No newline at end of file