diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 87a087a7..5a040682 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -29,10 +29,10 @@ jobs: schemas_changed: ${{ steps.changed_files.outputs.files_changed }} steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup .NET - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 # Disable Strong Name Verification to let us pull a switch-a-roo - name: Disable strong name validation @@ -51,19 +51,19 @@ jobs: run: rm .\NewHorizons\bin\${{ inputs.build_type }}\NewHorizons.xml - name: Upload Mod Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: xen.NewHorizons.${{ inputs.build_type }} path: .\NewHorizons\bin\${{ inputs.build_type }} - name: Upload Schemas Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: NewHorizons-Schemas-${{ inputs.build_type }} path: .\NewHorizons\Schemas - name: Verify Changed Schemas - uses: tj-actions/verify-changed-files@v17 + uses: tj-actions/verify-changed-files@v20 id: changed_files with: files: NewHorizons/Schemas/** diff --git a/.github/workflows/docs_build.yml b/.github/workflows/docs_build.yml index 7511a4bb..af14ae80 100644 --- a/.github/workflows/docs_build.yml +++ b/.github/workflows/docs_build.yml @@ -29,10 +29,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download Schemas if: ${{ inputs.schemas_artifact != 'null' }} - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ inputs.schemas_artifact }} path: NewHorizons/Schemas @@ -55,4 +55,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index d27381cc..c2aab503 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Read Manifest id: read-manifest uses: notiz-dev/github-action-json-property@release @@ -66,7 +66,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download Asset - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: xen.NewHorizons.Release path: xen.NewHorizons diff --git a/.github/workflows/update_schemas.yml b/.github/workflows/update_schemas.yml index 9f9a4194..f570ec90 100644 --- a/.github/workflows/update_schemas.yml +++ b/.github/workflows/update_schemas.yml @@ -18,12 +18,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.SCHEMAS_TOKEN }} - name: Download Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ inputs.artifact_name }} path: NewHorizons/Schemas/ diff --git a/NewHorizons/Builder/ShipLog/MapModeBuilder.cs b/NewHorizons/Builder/ShipLog/MapModeBuilder.cs index 15b753bc..22039b4c 100644 --- a/NewHorizons/Builder/ShipLog/MapModeBuilder.cs +++ b/NewHorizons/Builder/ShipLog/MapModeBuilder.cs @@ -31,6 +31,19 @@ namespace NewHorizons.Builder.ShipLog foreach (var shipLogAstroObject in currentNav.SelectMany(x => x)) { var astroObject = Locator.GetAstroObject(AstroObject.StringIDToAstroObjectName(shipLogAstroObject._id)); + if (astroObject == null) + { + // Outsider compat + if (shipLogAstroObject._id == "POWER_STATION") + { + astroObject = GameObject.FindObjectsOfType().FirstOrDefault(x => x._customName == "Power Station"); + } + else + { + NHLogger.LogError($"Couldn't find stock (?) astro object [{shipLogAstroObject?._id}]"); + continue; + } + } _astroObjectToShipLog[astroObject.gameObject] = shipLogAstroObject; } diff --git a/NewHorizons/Components/Props/NHSupernovaPlanetEffectController.cs b/NewHorizons/Components/Props/NHSupernovaPlanetEffectController.cs index 0f87cca3..7b08bddd 100644 --- a/NewHorizons/Components/Props/NHSupernovaPlanetEffectController.cs +++ b/NewHorizons/Components/Props/NHSupernovaPlanetEffectController.cs @@ -188,7 +188,11 @@ namespace NewHorizons.Components.Props { for (int i = 0; i < _ambientLight.Length; i++) { - _ambientLight[i].intensity = _ambientLightOrigIntensity[i] * (1f - collapseProgress); + var ambientLight = _ambientLight[i]; + if (ambientLight != null) + { + ambientLight.intensity = _ambientLightOrigIntensity[i] * (1f - collapseProgress); + } } } diff --git a/NewHorizons/Components/ShipLog/ShipLogStarChartMode.cs b/NewHorizons/Components/ShipLog/ShipLogStarChartMode.cs index 57d48c35..2c1828d1 100644 --- a/NewHorizons/Components/ShipLog/ShipLogStarChartMode.cs +++ b/NewHorizons/Components/ShipLog/ShipLogStarChartMode.cs @@ -34,10 +34,13 @@ namespace NewHorizons.Components.ShipLog private int _nextCardIndex; + private HashSet _systemCards = new(); + private void Awake() { // Prompts Locator.GetPromptManager().AddScreenPrompt(_warpPrompt, PromptPosition.UpperLeft, false); + _systemCards.Clear(); } public override void Initialize(ScreenPromptList centerPromptList, ScreenPromptList upperRightPromptList, OWAudioSource oneShotSource) @@ -70,8 +73,15 @@ namespace NewHorizons.Components.ShipLog public void AddSystemCard(string uniqueID) { - var card = CreateCard(uniqueID, root.transform, new Vector2(_nextCardIndex++ * 200, 0)); - _starSystemCards.Add(card); + if (!_systemCards.Contains(uniqueID)) + { + var card = CreateCard(uniqueID, root.transform, new Vector2(_nextCardIndex++ * 200, 0)); + _starSystemCards.Add(card); + } + else + { + NHLogger.LogWarning($"Tried making duplicate system card {uniqueID}"); + } } public void OnDestroy() diff --git a/NewHorizons/manifest.json b/NewHorizons/manifest.json index 205ce96a..1a7cdab3 100644 --- a/NewHorizons/manifest.json +++ b/NewHorizons/manifest.json @@ -4,7 +4,7 @@ "author": "xen, Bwc9876, JohnCorby, MegaPiggy, Clay, Trifid, and friends", "name": "New Horizons", "uniqueName": "xen.NewHorizons", - "version": "1.21.1", + "version": "1.21.2", "owmlVersion": "2.12.1", "dependencies": [ "JohnCorby.VanillaFix", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ], "conflicts": [ "PacificEngine.OW_CommonResources" ],