From 1dc04d75622d5a6fe437d10ac8d2b313dfae3be8 Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 27 Sep 2023 13:19:28 -0400 Subject: [PATCH] Update to 14, learn launch codes if starting loop 1 in a custom system --- NewHorizons/Main.cs | 7 +++++++ NewHorizons/NewHorizons.csproj | 4 ++-- NewHorizons/manifest.json | 4 ++-- SchemaExporter/SchemaExporter.csproj | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/NewHorizons/Main.cs b/NewHorizons/Main.cs index facd1493..dcc6f09d 100644 --- a/NewHorizons/Main.cs +++ b/NewHorizons/Main.cs @@ -544,6 +544,13 @@ namespace NewHorizons ResetCurrentStarSystem(); } + // We are in a custom system on the first loop -> The time loop isn't active, that's not very good + // TimeLoop uses the launch codes condition to know if they loop is active or not + if (CurrentStarSystem != "SolarSystem" && CurrentStarSystem != "EyeOfTheUniverse" && PlayerData.LoadLoopCount() == 1) + { + PlayerData.SetPersistentCondition("LAUNCH_CODES_GIVEN", true); + } + // We only check previous when the scene unloads, and at that point current should be updated to the new system NHLogger.LogVerbose($"Set the previous system to {CurrentStarSystem}"); _previousStarSystem = CurrentStarSystem; diff --git a/NewHorizons/NewHorizons.csproj b/NewHorizons/NewHorizons.csproj index 97051df9..c1e195b3 100644 --- a/NewHorizons/NewHorizons.csproj +++ b/NewHorizons/NewHorizons.csproj @@ -15,8 +15,8 @@ none - - + + diff --git a/NewHorizons/manifest.json b/NewHorizons/manifest.json index 42fe40e5..e493bc9c 100644 --- a/NewHorizons/manifest.json +++ b/NewHorizons/manifest.json @@ -4,8 +4,8 @@ "author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book", "name": "New Horizons", "uniqueName": "xen.NewHorizons", - "version": "1.16.4", - "owmlVersion": "2.9.7", + "version": "1.17.0", + "owmlVersion": "2.9.8", "dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ], "conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ], "pathsToPreserve": [ "planets", "systems", "translations" ] diff --git a/SchemaExporter/SchemaExporter.csproj b/SchemaExporter/SchemaExporter.csproj index 010199ac..e4e5c0f6 100644 --- a/SchemaExporter/SchemaExporter.csproj +++ b/SchemaExporter/SchemaExporter.csproj @@ -20,7 +20,7 @@ - +