## Bug fixes

- Fix an issue where a signal from Astral Codec mistakenly thought it
was inside Dark Bramble if the Outsider was installed. (closes #966)
- Fix moving satellites of satellites of planets (closes #960)
- Fix size of tornado force volumes
This commit is contained in:
xen-42 2024-10-09 23:59:35 -04:00 committed by GitHub
commit c20b2a4248
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 50 additions and 8 deletions

View File

@ -171,7 +171,15 @@ namespace NewHorizons.Builder.Props.Audio
audioSignal._onlyAudibleToScope = info.onlyAudibleToScope;
audioSignal._identificationDistance = info.identificationRadius;
audioSignal._canBePickedUpByScope = true;
// The outsider adds outer fog warp volumes to Bramble which break any signals NH places there
if (Main.Instance.ModHelper.Interaction.ModExists("SBtT.TheOutsider") && planetGO.GetComponent<AstroObject>()._name == AstroObject.Name.DarkBramble)
{
audioSignal._outerFogWarpVolume = null;
}
else
{
audioSignal._outerFogWarpVolume = planetGO.GetComponentInChildren<OuterFogWarpVolume>(); // shouldn't break non-bramble signals
}
// If it can be heard regularly then we play it immediately
owAudioSource.playOnAwake = !info.onlyAudibleToScope;

View File

@ -158,7 +158,7 @@ namespace NewHorizons.Builder.Props
// Resize it so the force volume goes all the way up
var fluidGO = tornadoGO.transform.Find(downwards ? "MockDownTornado_FluidCenter" : "MockUpTornado_FluidCenter");
fluidGO.GetComponent<TornadoFluidVolume>()._fluidType = info.fluidType.ConvertToOW(FluidVolume.Type.CLOUD);
fluidGO.localScale = new Vector3(1, 2f, 1);
fluidGO.localPosition = Vector3.up * 4.8f;
if (info.tint != null)
{

View File

@ -61,6 +61,7 @@ namespace NewHorizons.External.Modules
/// <summary>
/// Relative filepath to the fog color ramp texture, if you put fog.
/// x axis is angle to sun (left at midnight, right at noon), y axis is distance to camera (close at bottom, far at top).
/// Optional. If you set fogTint, a default fog ramp will be tinted for you.
/// </summary>
public string fogRampPath;

View File

@ -91,6 +91,9 @@ public static class HeldItemHandler
private static void OnStarSystemChanging(string _)
{
// Double check we're still holding it
_currentlyHeldItem = Locator.GetToolModeSwapper().GetItemCarryTool().GetHeldItem()?.gameObject;
if (_currentlyHeldItem != null)
{
// Track it so that when we return to this system we can delete the original

View File

@ -848,6 +848,8 @@ namespace NewHorizons.Handlers
// Get ready to move all the satellites
var relativeMoonPositions = children.Select(x => x.transform.position - go.transform.position).ToArray();
var relativeMoonMoonPositions = children.Select(x => AstroObjectLocator.GetChildren(x.GetComponent<AstroObject>())
.Select(childchild => (childchild?.transform?.position ?? Vector3.zero) - go.transform.position)).ToArray();
// If its tidally locked change the alignment
var alignment = go.GetComponent<AlignWithTargetBody>();
@ -874,11 +876,15 @@ namespace NewHorizons.Handlers
}
else
{
var j = 0;
foreach (var childChild in AstroObjectLocator.GetChildren(childAO))
{
if (childChild == null) continue;
var dPos = childChild.transform.position - child.transform.position;
childChild.transform.position = go.transform.position + relativeMoonPositions[i] + dPos;
if (childChild != null)
{
var dPos = relativeMoonMoonPositions[i].ElementAt(j);
childChild.transform.position = go.transform.position + dPos;
}
j++;
}
// Make sure the moons get updated to the new AO
childAO._primaryBody = newAO;

View File

@ -146,7 +146,8 @@ namespace NewHorizons
void DefineStarSystem(string name, string config, IModBehaviour mod);
/// <summary>
/// Allows creation of dialogue by directly passing the xml and dialogueInfo json contents as strings
/// Allows creation of dialogue by directly passing the xml and dialogueInfo json contents as strings.
/// Must be called at least 2 frames before entering dialogue if you're using ReuseDialogueOptionsFrom
/// </summary>
/// <param name="textAssetID">TextAsset name used for compatibility with voice mod. Just has to be a unique identifier.</param>
/// <param name="xml">The contents of the dialogue xml file as a string</param>

View File

@ -23,7 +23,10 @@ namespace NewHorizons.Patches.WarpPatches
if (!Main.Instance.IsWarpingFromVessel)
PlayerData.SaveWarpedToTheEye(TimeLoopUtilities.GetVanillaSecondsRemaining());
// This is totally letting us see the interior of bramble when warping
Locator.GetPlayerSectorDetector().RemoveFromAllSectors();
// This is a very jank workaround to stop us seeing all that #957
Locator.GetPlayerCamera().farClipPlane = 0;
LoadManager.EnableAsyncLoadTransition();
return false;

View File

@ -370,7 +370,7 @@
},
"fogRampPath": {
"type": "string",
"description": "Relative filepath to the fog color ramp texture, if you put fog.\nx axis is angle to sun (left at midnight, right at noon), y axis is distance to camera (close at bottom, far at top)."
"description": "Relative filepath to the fog color ramp texture, if you put fog.\nx axis is angle to sun (left at midnight, right at noon), y axis is distance to camera (close at bottom, far at top).\nOptional. If you set fogTint, a default fog ramp will be tinted for you."
},
"hasOxygen": {
"type": "boolean",

View File

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

View File

@ -27,6 +27,26 @@ A persistent condition is similar to a condition, except it _persists_ through l
A remote trigger is used to have an NPC talk to you from a distance; ex: Slate stopping you for the umpteenth time to tell you information you already knew.
### ReuseDialogueOptionsListFrom
This is a custom XML node introduced by New Horizons. Use it when adding new dialogue to existing characters, to repeat the dialogue options list from another node.
For example, Slate's first dialogue with options is named `Scientist5`. To make a custom DialogueNode using these dialogue options (meaning new dialogue said by Slate, but reusing the possible player responses) you can write:
```xml
<DialogueNode>
<Name>...</Name>
<Dialogue>
<Page>NEW DIALOGUE FOR SLATE HERE.</Page>
</Dialogue>
<DialogueOptionsList>
<ReuseDialogueOptionsListFrom>Scientist5</ReuseDialogueOptionsListFrom>
</DialogueOptionsList>
</DialogueNode>
```
Note: If you're loading dialogue in code, 2 frames must pass before entering the conversation in order for ReuseDialogueOptionsListFrom to take effect.
## Example XML
Here's an example dialogue XML: