Skip to content

Commit

Permalink
1.21.2 (#895)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
xen-42 committed Jun 14, 2024
2 parents aca6ee2 + e55818b commit 7e5e357
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 16 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/**
6 changes: 3 additions & 3 deletions .github/workflows/docs_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -55,4 +55,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update_schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
13 changes: 13 additions & 0 deletions NewHorizons/Builder/ShipLog/MapModeBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ public static ShipLogAstroObject[][] ConstructMapMode(string systemName, GameObj
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<AstroObject>().FirstOrDefault(x => x._customName == "Power Station");
}
else
{
NHLogger.LogError($"Couldn't find stock (?) astro object [{shipLogAstroObject?._id}]");
continue;
}
}
_astroObjectToShipLog[astroObject.gameObject] = shipLogAstroObject;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ public void Update()
{
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);
}
}
}

Expand Down
14 changes: 12 additions & 2 deletions NewHorizons/Components/ShipLog/ShipLogStarChartMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ public class ShipLogStarChartMode : ShipLogMode

private int _nextCardIndex;

private HashSet<string> _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)
Expand Down Expand Up @@ -70,8 +73,15 @@ public override void Initialize(ScreenPromptList centerPromptList, ScreenPromptL

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()
Expand Down
2 changes: 1 addition & 1 deletion NewHorizons/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" ],
Expand Down

0 comments on commit 7e5e357

Please sign in to comment.