mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
1.10.1 (#556)
## Bug fixes - Made the `alignmentTargetBody` field on warp pads actually work - Fixed `removeComponents` breaking object parenting
This commit is contained in:
commit
a31e1d0499
2
.github/workflows/docs_build.yml
vendored
2
.github/workflows/docs_build.yml
vendored
@ -12,7 +12,7 @@ on:
|
||||
branches: [main]
|
||||
paths:
|
||||
- docs/**
|
||||
- NewHorizons/Schemas/*.xsd
|
||||
- NewHorizons/Schemas/*
|
||||
|
||||
env:
|
||||
URL_PREFIX: '/'
|
||||
|
||||
7
.github/workflows/release_build.yml
vendored
7
.github/workflows/release_build.yml
vendored
@ -35,13 +35,6 @@ jobs:
|
||||
with:
|
||||
artifact_name: NewHorizons-Schemas-Release
|
||||
secrets: inherit
|
||||
Update_Docs:
|
||||
name: 'Update Docs'
|
||||
needs: Build
|
||||
if: ${{ needs.Build.outputs.schemas_changed == 'true' && github.ref == 'refs/heads/main' }} # Same thing with docs
|
||||
uses: './.github/workflows/docs_build.yml'
|
||||
with:
|
||||
schemas_artifact: NewHorizons-Schemas-Debug
|
||||
Update_Release:
|
||||
name: 'Create/Update Release Asset'
|
||||
needs: Build
|
||||
|
||||
@ -170,6 +170,8 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
if (detail.removeComponents)
|
||||
{
|
||||
NHLogger.LogVerbose($"Removing all components from [{prop.name}]");
|
||||
|
||||
// Just swap all the children to a new game object
|
||||
var newDetailGO = new GameObject(prop.name);
|
||||
newDetailGO.transform.position = prop.transform.position;
|
||||
@ -185,7 +187,8 @@ namespace NewHorizons.Builder.Props
|
||||
{
|
||||
child.parent = newDetailGO.transform;
|
||||
}
|
||||
GameObject.Destroy(prop);
|
||||
// Have to destroy it right away, else parented props might get attached to the old one
|
||||
GameObject.DestroyImmediate(prop);
|
||||
prop = newDetailGO;
|
||||
}
|
||||
|
||||
|
||||
@ -16,9 +16,15 @@ namespace NewHorizons.Builder.Props
|
||||
// Returns the character dialogue tree and remote dialogue trigger, if applicable.
|
||||
public static (CharacterDialogueTree, RemoteDialogueTrigger) Make(GameObject go, Sector sector, DialogueInfo info, IModBehaviour mod)
|
||||
{
|
||||
NHLogger.LogVerbose($"[DIALOGUE] Created a new character dialogue [{info.rename}] on [{info.parentPath}]");
|
||||
|
||||
// In stock I think they disable dialogue stuff with conditions
|
||||
// Here we just don't make it at all
|
||||
if (info.blockAfterPersistentCondition != null && PlayerData.GetPersistentCondition(info.blockAfterPersistentCondition)) return (null, null);
|
||||
if (!string.IsNullOrEmpty(info.blockAfterPersistentCondition) && PlayerData.GetPersistentCondition(info.blockAfterPersistentCondition))
|
||||
{
|
||||
NHLogger.LogVerbose($"[DIALOGUE] Persistent condition [{info.blockAfterPersistentCondition}] was met for [{info.rename}], aborting");
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
var dialogue = MakeConversationZone(go, sector, info, mod.ModHelper);
|
||||
|
||||
|
||||
@ -106,11 +106,15 @@ namespace NewHorizons.Builder.Props
|
||||
{
|
||||
try
|
||||
{
|
||||
DialogueBuilder.Make(go, sector, dialogueInfo, mod);
|
||||
var (dialogue, trigger) = DialogueBuilder.Make(go, sector, dialogueInfo, mod);
|
||||
if (dialogue == null)
|
||||
{
|
||||
NHLogger.LogVerbose($"[DIALOGUE] Failed to create dialogue [{dialogueInfo.xmlFile}]");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
NHLogger.LogError($"Couldn't make dialogue [{dialogueInfo.xmlFile}] for [{go.name}]:\n{ex}");
|
||||
NHLogger.LogError($"[DIALOGUE] Couldn't make dialogue [{dialogueInfo.xmlFile}] for [{go.name}]:\n{ex}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ using NewHorizons.Builder.Props.TranslatorText;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.External.Modules.WarpPad;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.OuterWilds;
|
||||
using NewHorizons.Utility.OWML;
|
||||
using OWML.Utils;
|
||||
using UnityEngine;
|
||||
@ -94,7 +95,26 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
receiver._frequency = GetFrequency(info.frequency);
|
||||
|
||||
receiver._alignmentTarget = planetGO?.transform;
|
||||
if (string.IsNullOrEmpty(info.alignmentTargetBody))
|
||||
{
|
||||
receiver._alignmentTarget = planetGO?.transform;
|
||||
}
|
||||
else
|
||||
{
|
||||
Delay.FireOnNextUpdate(() =>
|
||||
{
|
||||
var targetAO = AstroObjectLocator.GetAstroObject(info.alignmentTargetBody);
|
||||
if (targetAO != null)
|
||||
{
|
||||
receiver._alignmentTarget = targetAO.transform;
|
||||
}
|
||||
else
|
||||
{
|
||||
NHLogger.LogError($"Could not find target body [{info.alignmentTargetBody}] for warp receiver.");
|
||||
receiver._alignmentTarget = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
receiverObject.SetActive(true);
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book",
|
||||
"name": "New Horizons",
|
||||
"uniqueName": "xen.NewHorizons",
|
||||
"version": "1.10.0",
|
||||
"version": "1.10.1",
|
||||
"owmlVersion": "2.9.0",
|
||||
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
|
||||
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user