## Bug fixes
- Fix compatibility issues with the Outsider that somehow got triggered
by Patch 15
- Fixed an NRE in NHSupernovaPlanetEffectController that happens with
vanilla bodies
- Potentially fix multiple star system cards appearing
This commit is contained in:
xen-42 2024-06-14 11:47:37 -04:00 committed by GitHub
commit 7e5e357c08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 43 additions and 16 deletions

View File

@ -29,10 +29,10 @@ jobs:
schemas_changed: ${{ steps.changed_files.outputs.files_changed }} schemas_changed: ${{ steps.changed_files.outputs.files_changed }}
steps: steps:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Setup .NET - 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 # Disable Strong Name Verification to let us pull a switch-a-roo
- name: Disable strong name validation - name: Disable strong name validation
@ -51,19 +51,19 @@ jobs:
run: rm .\NewHorizons\bin\${{ inputs.build_type }}\NewHorizons.xml run: rm .\NewHorizons\bin\${{ inputs.build_type }}\NewHorizons.xml
- name: Upload Mod Artifact - name: Upload Mod Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: xen.NewHorizons.${{ inputs.build_type }} name: xen.NewHorizons.${{ inputs.build_type }}
path: .\NewHorizons\bin\${{ inputs.build_type }} path: .\NewHorizons\bin\${{ inputs.build_type }}
- name: Upload Schemas Artifact - name: Upload Schemas Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: NewHorizons-Schemas-${{ inputs.build_type }} name: NewHorizons-Schemas-${{ inputs.build_type }}
path: .\NewHorizons\Schemas path: .\NewHorizons\Schemas
- name: Verify Changed Schemas - name: Verify Changed Schemas
uses: tj-actions/verify-changed-files@v17 uses: tj-actions/verify-changed-files@v20
id: changed_files id: changed_files
with: with:
files: NewHorizons/Schemas/** files: NewHorizons/Schemas/**

View File

@ -29,10 +29,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Download Schemas - name: Download Schemas
if: ${{ inputs.schemas_artifact != 'null' }} if: ${{ inputs.schemas_artifact != 'null' }}
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
with: with:
name: ${{ inputs.schemas_artifact }} name: ${{ inputs.schemas_artifact }}
path: NewHorizons/Schemas path: NewHorizons/Schemas
@ -55,4 +55,4 @@ jobs:
steps: steps:
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
id: deployment id: deployment
uses: actions/deploy-pages@v1 uses: actions/deploy-pages@v4

View File

@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: "actions/checkout@v3" uses: "actions/checkout@v4"
- name: Read Manifest - name: Read Manifest
id: read-manifest id: read-manifest
uses: notiz-dev/github-action-json-property@release uses: notiz-dev/github-action-json-property@release
@ -66,7 +66,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Download Asset - name: Download Asset
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
with: with:
name: xen.NewHorizons.Release name: xen.NewHorizons.Release
path: xen.NewHorizons path: xen.NewHorizons

View File

@ -18,12 +18,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
token: ${{ secrets.SCHEMAS_TOKEN }} token: ${{ secrets.SCHEMAS_TOKEN }}
- name: Download Artifact - name: Download Artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
with: with:
name: ${{ inputs.artifact_name }} name: ${{ inputs.artifact_name }}
path: NewHorizons/Schemas/ path: NewHorizons/Schemas/

View File

@ -31,6 +31,19 @@ namespace NewHorizons.Builder.ShipLog
foreach (var shipLogAstroObject in currentNav.SelectMany(x => x)) foreach (var shipLogAstroObject in currentNav.SelectMany(x => x))
{ {
var astroObject = Locator.GetAstroObject(AstroObject.StringIDToAstroObjectName(shipLogAstroObject._id)); var astroObject = Locator.GetAstroObject(AstroObject.StringIDToAstroObjectName(shipLogAstroObject._id));
if (astroObject == null)
{
// Outsider compat
if (shipLogAstroObject._id == "POWER_STATION")
{
astroObject = GameObject.FindObjectsOfType<AstroObject>().FirstOrDefault(x => x._customName == "Power Station");
}
else
{
NHLogger.LogError($"Couldn't find stock (?) astro object [{shipLogAstroObject?._id}]");
continue;
}
}
_astroObjectToShipLog[astroObject.gameObject] = shipLogAstroObject; _astroObjectToShipLog[astroObject.gameObject] = shipLogAstroObject;
} }

View File

@ -188,7 +188,11 @@ namespace NewHorizons.Components.Props
{ {
for (int i = 0; i < _ambientLight.Length; i++) 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);
}
} }
} }

View File

@ -34,10 +34,13 @@ namespace NewHorizons.Components.ShipLog
private int _nextCardIndex; private int _nextCardIndex;
private HashSet<string> _systemCards = new();
private void Awake() private void Awake()
{ {
// Prompts // Prompts
Locator.GetPromptManager().AddScreenPrompt(_warpPrompt, PromptPosition.UpperLeft, false); Locator.GetPromptManager().AddScreenPrompt(_warpPrompt, PromptPosition.UpperLeft, false);
_systemCards.Clear();
} }
public override void Initialize(ScreenPromptList centerPromptList, ScreenPromptList upperRightPromptList, OWAudioSource oneShotSource) public override void Initialize(ScreenPromptList centerPromptList, ScreenPromptList upperRightPromptList, OWAudioSource oneShotSource)
@ -69,10 +72,17 @@ namespace NewHorizons.Components.ShipLog
} }
public void AddSystemCard(string uniqueID) public void AddSystemCard(string uniqueID)
{
if (!_systemCards.Contains(uniqueID))
{ {
var card = CreateCard(uniqueID, root.transform, new Vector2(_nextCardIndex++ * 200, 0)); var card = CreateCard(uniqueID, root.transform, new Vector2(_nextCardIndex++ * 200, 0));
_starSystemCards.Add(card); _starSystemCards.Add(card);
} }
else
{
NHLogger.LogWarning($"Tried making duplicate system card {uniqueID}");
}
}
public void OnDestroy() public void OnDestroy()
{ {

View File

@ -4,7 +4,7 @@
"author": "xen, Bwc9876, JohnCorby, MegaPiggy, Clay, Trifid, and friends", "author": "xen, Bwc9876, JohnCorby, MegaPiggy, Clay, Trifid, and friends",
"name": "New Horizons", "name": "New Horizons",
"uniqueName": "xen.NewHorizons", "uniqueName": "xen.NewHorizons",
"version": "1.21.1", "version": "1.21.2",
"owmlVersion": "2.12.1", "owmlVersion": "2.12.1",
"dependencies": [ "JohnCorby.VanillaFix", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ], "dependencies": [ "JohnCorby.VanillaFix", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
"conflicts": [ "PacificEngine.OW_CommonResources" ], "conflicts": [ "PacificEngine.OW_CommonResources" ],