From 3bfd688e57a74015ef853cd6ad628fffa4d30e18 Mon Sep 17 00:00:00 2001 From: coderCleric Date: Mon, 15 May 2023 14:50:45 -0600 Subject: [PATCH 01/30] Fixed "None" vine prefab causing an NRE on dimension enter --- NewHorizons/Builder/Body/BrambleDimensionBuilder.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs b/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs index 17707c01..c1f46b2d 100644 --- a/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs +++ b/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs @@ -243,13 +243,13 @@ namespace NewHorizons.Builder.Body cloak._sectors = new Sector[] { sector }; cloak.GetComponent().enabled = true; - // Cull stuff - var cullController = go.AddComponent(); - cullController.SetSector(sector); - // Do next update so other nodes can be built first Delay.FireOnNextUpdate(() => { + // Cull stuff + var cullController = go.AddComponent(); + cullController.SetSector(sector); + // Prevent recursion from causing hard crash foreach (var senderWarp in outerFogWarpVolume._senderWarps.ToList()) { From fdac1dd6e6be935b179c0a6c3fe4ba2c06848257 Mon Sep 17 00:00:00 2001 From: coderCleric Date: Mon, 15 May 2023 17:52:36 -0600 Subject: [PATCH 02/30] Fixed angler animation events disconnecting for added fish --- NewHorizons/Builder/Props/DetailBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Builder/Props/DetailBuilder.cs b/NewHorizons/Builder/Props/DetailBuilder.cs index 1d3df4fa..2cb79c45 100644 --- a/NewHorizons/Builder/Props/DetailBuilder.cs +++ b/NewHorizons/Builder/Props/DetailBuilder.cs @@ -363,7 +363,7 @@ namespace NewHorizons.Builder.Props else if(component is Shape shape) shape.enabled = true; // If it's not a moving anglerfish make sure the anim controller is regular - else if(component is AnglerfishAnimController && component.GetComponentInParent() == null) + else if(component is AnglerfishAnimController && component.transform.parent.GetComponent() == null) //Manual parent chain so we can find inactive { component.gameObject.AddComponent(); } @@ -380,7 +380,7 @@ namespace NewHorizons.Builder.Props public void Start() { var angler = GetComponent(); - + NHLogger.LogVerbose("Fixing anglerfish animation"); // Remove any event reference to its angler From df0a182a7827dafe29c0d656957d03de8d776fc8 Mon Sep 17 00:00:00 2001 From: TerrificTrifid <99054745+TerrificTrifid@users.noreply.github.com> Date: Fri, 26 May 2023 13:27:12 -0500 Subject: [PATCH 03/30] Audio volume direction settings --- NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs | 6 ++++++ .../Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs b/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs index 6b961a79..9b742f83 100644 --- a/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs @@ -3,6 +3,7 @@ using NewHorizons.External.Modules.Volumes.VolumeInfos; using NewHorizons.Utility; using NewHorizons.Utility.Files; using NewHorizons.Utility.OuterWilds; +using NewHorizons.Utility.OWML; using OWML.Common; using UnityEngine; @@ -24,6 +25,11 @@ namespace NewHorizons.Builder.Volumes owAudioSource.SetClipSelectionType(info.clipSelection.ConvertToOW()); owAudioSource.SetTrack(info.track.ConvertToOW()); AudioUtilities.SetAudioClip(owAudioSource, info.audio, mod); + Delay.FireOnNextUpdate(() => + { + owAudioSource.spatialBlend = info.spatialBlend ? 1 : 0; + owAudioSource.spread = info.spread; + }); var audioVolume = go.AddComponent(); audioVolume._layer = info.layer; diff --git a/NewHorizons/External/Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs b/NewHorizons/External/Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs index 6334ace0..42347ef2 100644 --- a/NewHorizons/External/Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs +++ b/NewHorizons/External/Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs @@ -52,6 +52,18 @@ namespace NewHorizons.External.Modules.Volumes.VolumeInfos /// Pause the music when exiting the volume. /// public bool pauseOnFadeOut; + + /// + /// Whether the audio sounds like it emits from the center of the volume. + /// + public bool spatialBlend; + + /// + /// If spatialBlend is true, how much does the direction of audio "spread" out from facing the center, between 0 and 180 degrees. + /// + [Range(0f, 180f)] + [DefaultValue(180f)] + public float spread = 180f; } } From a6e47607324d162dd5aeaadb57275ac5c2ce330b Mon Sep 17 00:00:00 2001 From: Ben C Date: Fri, 26 May 2023 18:30:04 +0000 Subject: [PATCH 04/30] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index ce24bb0f..53c1fca0 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -3457,6 +3457,18 @@ "pauseOnFadeOut": { "type": "boolean", "description": "Pause the music when exiting the volume." + }, + "spatialBlend": { + "type": "boolean", + "description": "Whether the audio sounds like it emits from the center of the volume." + }, + "spread": { + "type": "number", + "description": "If spatialBlend is true, how much does the direction of audio \"spread\" out from facing the center, between 0 and 180 degrees.", + "format": "float", + "default": 180.0, + "maximum": 180.0, + "minimum": 0.0 } } }, From 2ce361e182213fd3286c9ecbbd3ba894ebc941c0 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Fri, 26 May 2023 13:31:41 -0700 Subject: [PATCH 05/30] priority doc --- NewHorizons/External/Modules/BaseModule.cs | 2 +- .../External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NewHorizons/External/Modules/BaseModule.cs b/NewHorizons/External/Modules/BaseModule.cs index 2f36f5a4..cfab241e 100644 --- a/NewHorizons/External/Modules/BaseModule.cs +++ b/NewHorizons/External/Modules/BaseModule.cs @@ -69,7 +69,7 @@ namespace NewHorizons.External.Modules /// /// Optional. You can force this planet's gravity to be felt over other gravity/zero-gravity sources by increasing this number. /// - public int gravityVolumePriority; + [DefaultValue(0)] public int gravityVolumePriority = 0; #region Obsolete diff --git a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs index 574d93dc..408bca69 100644 --- a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs +++ b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs @@ -14,6 +14,8 @@ namespace NewHorizons.External.Modules.Volumes.VolumeInfos /// /// The priority for this volume's effects to be applied. /// Ex, a player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity. + /// + /// Default value here is 1 instead of 0 so it automatically overrides planet gravity, which is 0 by default. /// [DefaultValue(1)] public int priority = 1; } From 7b23580e56668365609d75a32da1468f504c17c5 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Fri, 26 May 2023 13:45:09 -0700 Subject: [PATCH 06/30] doc layers --- .../Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs index 408bca69..ce35c031 100644 --- a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs +++ b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs @@ -8,12 +8,19 @@ namespace NewHorizons.External.Modules.Volumes.VolumeInfos { /// /// The layer of this volume. + /// + /// Layers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal. + /// The exception is layer 0. Layer 0 effectively bypasses the layer system. The priority of volumes in layer 0 will override volumes in all other layers, as if they were all in the same layer. + /// + /// Default value here is 0 because in most cases people don't want to think about layers and only care about priority. /// [DefaultValue(0)] public int layer = 0; /// - /// The priority for this volume's effects to be applied. - /// Ex, a player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity. + /// The priority of this volume. + /// + /// Volumes of higher priority will override volumes of lower priority. Volumes of the same priority will stack like normal. + /// Ex: A player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity. /// /// Default value here is 1 instead of 0 so it automatically overrides planet gravity, which is 0 by default. /// From 44d3a24d3aac7e6e030d75437ef4c2b3133f980a Mon Sep 17 00:00:00 2001 From: Ben C Date: Fri, 26 May 2023 20:47:09 +0000 Subject: [PATCH 07/30] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index ce24bb0f..037d202f 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -560,7 +560,8 @@ "gravityVolumePriority": { "type": "integer", "description": "Optional. You can force this planet's gravity to be felt over other gravity/zero-gravity sources by increasing this number.", - "format": "int32" + "format": "int32", + "default": 0 } } }, @@ -3382,13 +3383,13 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. The priority of volumes in layer 0 will override volumes in all other layers, as if they were all in the same layer.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", "format": "int32", "default": 0 }, "priority": { "type": "integer", - "description": "The priority for this volume's effects to be applied. \nEx, a player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.", + "description": "The priority of this volume.\n\nVolumes of higher priority will override volumes of lower priority. Volumes of the same priority will stack like normal.\nEx: A player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.\n \nDefault value here is 1 instead of 0 so it automatically overrides planet gravity, which is 0 by default. ", "format": "int32", "default": 1 }, @@ -3560,13 +3561,13 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. The priority of volumes in layer 0 will override volumes in all other layers, as if they were all in the same layer.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", "format": "int32", "default": 0 }, "priority": { "type": "integer", - "description": "The priority for this volume's effects to be applied. \nEx, a player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.", + "description": "The priority of this volume.\n\nVolumes of higher priority will override volumes of lower priority. Volumes of the same priority will stack like normal.\nEx: A player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.\n \nDefault value here is 1 instead of 0 so it automatically overrides planet gravity, which is 0 by default. ", "format": "int32", "default": 1 }, @@ -4185,13 +4186,13 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. The priority of volumes in layer 0 will override volumes in all other layers, as if they were all in the same layer.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", "format": "int32", "default": 0 }, "priority": { "type": "integer", - "description": "The priority for this volume's effects to be applied. \nEx, a player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.", + "description": "The priority of this volume.\n\nVolumes of higher priority will override volumes of lower priority. Volumes of the same priority will stack like normal.\nEx: A player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.\n \nDefault value here is 1 instead of 0 so it automatically overrides planet gravity, which is 0 by default. ", "format": "int32", "default": 1 }, @@ -4239,13 +4240,13 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. The priority of volumes in layer 0 will override volumes in all other layers, as if they were all in the same layer.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", "format": "int32", "default": 0 }, "priority": { "type": "integer", - "description": "The priority for this volume's effects to be applied. \nEx, a player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.", + "description": "The priority of this volume.\n\nVolumes of higher priority will override volumes of lower priority. Volumes of the same priority will stack like normal.\nEx: A player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.\n \nDefault value here is 1 instead of 0 so it automatically overrides planet gravity, which is 0 by default. ", "format": "int32", "default": 1 }, @@ -4313,13 +4314,13 @@ }, "layer": { "type": "integer", - "description": "The layer of this volume.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. The priority of volumes in layer 0 will override volumes in all other layers, as if they were all in the same layer.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", "format": "int32", "default": 0 }, "priority": { "type": "integer", - "description": "The priority for this volume's effects to be applied. \nEx, a player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.", + "description": "The priority of this volume.\n\nVolumes of higher priority will override volumes of lower priority. Volumes of the same priority will stack like normal.\nEx: A player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.\n \nDefault value here is 1 instead of 0 so it automatically overrides planet gravity, which is 0 by default. ", "format": "int32", "default": 1 } From c696129f5661acad9cda95301f16496817b6e90f Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Fri, 26 May 2023 14:27:19 -0700 Subject: [PATCH 08/30] clarify --- .../External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs index ce35c031..4e42cff7 100644 --- a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs +++ b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs @@ -10,7 +10,7 @@ namespace NewHorizons.External.Modules.Volumes.VolumeInfos /// The layer of this volume. /// /// Layers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal. - /// The exception is layer 0. Layer 0 effectively bypasses the layer system. The priority of volumes in layer 0 will override volumes in all other layers, as if they were all in the same layer. + /// The exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. /// /// Default value here is 0 because in most cases people don't want to think about layers and only care about priority. /// From 08ac2e1256a6a06bc0acbaff57121a94d8dcb7bf Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Fri, 26 May 2023 14:29:25 -0700 Subject: [PATCH 09/30] clarify AGAIN --- .../External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs index 4e42cff7..16349c70 100644 --- a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs +++ b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs @@ -10,7 +10,7 @@ namespace NewHorizons.External.Modules.Volumes.VolumeInfos /// The layer of this volume. /// /// Layers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal. - /// The exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. + /// The exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal. /// /// Default value here is 0 because in most cases people don't want to think about layers and only care about priority. /// From 1c68a9711df1ff4e72ec5686bf45832a341f07f1 Mon Sep 17 00:00:00 2001 From: Ben C Date: Fri, 26 May 2023 21:31:44 +0000 Subject: [PATCH 10/30] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 037d202f..2ae32650 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -3383,7 +3383,7 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. The priority of volumes in layer 0 will override volumes in all other layers, as if they were all in the same layer.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", "format": "int32", "default": 0 }, @@ -3561,7 +3561,7 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. The priority of volumes in layer 0 will override volumes in all other layers, as if they were all in the same layer.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", "format": "int32", "default": 0 }, @@ -4186,7 +4186,7 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. The priority of volumes in layer 0 will override volumes in all other layers, as if they were all in the same layer.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", "format": "int32", "default": 0 }, @@ -4240,7 +4240,7 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. The priority of volumes in layer 0 will override volumes in all other layers, as if they were all in the same layer.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", "format": "int32", "default": 0 }, @@ -4314,7 +4314,7 @@ }, "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. The priority of volumes in layer 0 will override volumes in all other layers, as if they were all in the same layer.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", "format": "int32", "default": 0 }, From b29cbb9a955f174c3e78d56963d47751e04d16de Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Fri, 26 May 2023 14:37:21 -0700 Subject: [PATCH 11/30] remove default cuz its not true --- .../Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs index 16349c70..8a7dd099 100644 --- a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs +++ b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs @@ -10,9 +10,7 @@ namespace NewHorizons.External.Modules.Volumes.VolumeInfos /// The layer of this volume. /// /// Layers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal. - /// The exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal. - /// - /// Default value here is 0 because in most cases people don't want to think about layers and only care about priority. + /// The exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal. /// [DefaultValue(0)] public int layer = 0; From 3943a0f02a7ab35f5db77b12607f2b95d6d9e401 Mon Sep 17 00:00:00 2001 From: Ben C Date: Fri, 26 May 2023 21:43:07 +0000 Subject: [PATCH 12/30] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 2ae32650..4be8d471 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -3383,7 +3383,7 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.", "format": "int32", "default": 0 }, @@ -3561,7 +3561,7 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.", "format": "int32", "default": 0 }, @@ -4186,7 +4186,7 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.", "format": "int32", "default": 0 }, @@ -4240,7 +4240,7 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.", "format": "int32", "default": 0 }, @@ -4314,7 +4314,7 @@ }, "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. Layer 0 effectively bypasses the layer system. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nDefault value here is 0 because in most cases people don't want to think about layers and only care about priority.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.", "format": "int32", "default": 0 }, From da309ac8492fbfa570bb193b1a82da8620f97b97 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 26 May 2023 18:40:24 -0400 Subject: [PATCH 13/30] Update PriorityVolumeInfo.cs --- .../Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs index 8a7dd099..0002f23a 100644 --- a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs +++ b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs @@ -11,6 +11,12 @@ namespace NewHorizons.External.Modules.Volumes.VolumeInfos /// /// Layers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal. /// The exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal. + /// + /// Ex: A player could be affected by the sun on layer 9 priority 0 and planet gravity on layer 3 priority 2. They would experience the gravity of both volumes since they are on different layers. + /// If there was a zero-g volume on layer 0 priority 1, since it is on layer 0 it will override the gravity from the sun (priority 0 which is less than 1) but they will still feel the + /// gravity of the planet (priority 2 is greater than 1). + /// + /// Default value here is 0 which means this volume's priority will be evaluated against all other priority volumes regardless of their layer. /// [DefaultValue(0)] public int layer = 0; From a7557ac22d07dcdfd0305303ea075db1156b09d6 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Fri, 26 May 2023 15:42:29 -0700 Subject: [PATCH 14/30] bleh --- .../External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs index 0002f23a..14e99020 100644 --- a/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs +++ b/NewHorizons/External/Modules/Volumes/VolumeInfos/PriorityVolumeInfo.cs @@ -14,7 +14,7 @@ namespace NewHorizons.External.Modules.Volumes.VolumeInfos /// /// Ex: A player could be affected by the sun on layer 9 priority 0 and planet gravity on layer 3 priority 2. They would experience the gravity of both volumes since they are on different layers. /// If there was a zero-g volume on layer 0 priority 1, since it is on layer 0 it will override the gravity from the sun (priority 0 which is less than 1) but they will still feel the - /// gravity of the planet (priority 2 is greater than 1). + /// gravity of the planet (priority 2 is greater than 1). The zero-g volume will also still be applied because it is on a different layer. /// /// Default value here is 0 which means this volume's priority will be evaluated against all other priority volumes regardless of their layer. /// From 41f5a774618e1c843dbf31cc73b3aeb7b84743ec Mon Sep 17 00:00:00 2001 From: Ben C Date: Fri, 26 May 2023 22:46:47 +0000 Subject: [PATCH 15/30] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 4be8d471..cbcb608a 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -3383,7 +3383,7 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nEx: A player could be affected by the sun on layer 9 priority 0 and planet gravity on layer 3 priority 2. They would experience the gravity of both volumes since they are on different layers.\nIf there was a zero-g volume on layer 0 priority 1, since it is on layer 0 it will override the gravity from the sun (priority 0 which is less than 1) but they will still feel the \ngravity of the planet (priority 2 is greater than 1). The zero-g volume will also still be applied because it is on a different layer.\n \nDefault value here is 0 which means this volume's priority will be evaluated against all other priority volumes regardless of their layer.", "format": "int32", "default": 0 }, @@ -3561,7 +3561,7 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nEx: A player could be affected by the sun on layer 9 priority 0 and planet gravity on layer 3 priority 2. They would experience the gravity of both volumes since they are on different layers.\nIf there was a zero-g volume on layer 0 priority 1, since it is on layer 0 it will override the gravity from the sun (priority 0 which is less than 1) but they will still feel the \ngravity of the planet (priority 2 is greater than 1). The zero-g volume will also still be applied because it is on a different layer.\n \nDefault value here is 0 which means this volume's priority will be evaluated against all other priority volumes regardless of their layer.", "format": "int32", "default": 0 }, @@ -4186,7 +4186,7 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nEx: A player could be affected by the sun on layer 9 priority 0 and planet gravity on layer 3 priority 2. They would experience the gravity of both volumes since they are on different layers.\nIf there was a zero-g volume on layer 0 priority 1, since it is on layer 0 it will override the gravity from the sun (priority 0 which is less than 1) but they will still feel the \ngravity of the planet (priority 2 is greater than 1). The zero-g volume will also still be applied because it is on a different layer.\n \nDefault value here is 0 which means this volume's priority will be evaluated against all other priority volumes regardless of their layer.", "format": "int32", "default": 0 }, @@ -4240,7 +4240,7 @@ "properties": { "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nEx: A player could be affected by the sun on layer 9 priority 0 and planet gravity on layer 3 priority 2. They would experience the gravity of both volumes since they are on different layers.\nIf there was a zero-g volume on layer 0 priority 1, since it is on layer 0 it will override the gravity from the sun (priority 0 which is less than 1) but they will still feel the \ngravity of the planet (priority 2 is greater than 1). The zero-g volume will also still be applied because it is on a different layer.\n \nDefault value here is 0 which means this volume's priority will be evaluated against all other priority volumes regardless of their layer.", "format": "int32", "default": 0 }, @@ -4314,7 +4314,7 @@ }, "layer": { "type": "integer", - "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.", + "description": "The layer of this volume.\n\nLayers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.\nThe exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.\n \nEx: A player could be affected by the sun on layer 9 priority 0 and planet gravity on layer 3 priority 2. They would experience the gravity of both volumes since they are on different layers.\nIf there was a zero-g volume on layer 0 priority 1, since it is on layer 0 it will override the gravity from the sun (priority 0 which is less than 1) but they will still feel the \ngravity of the planet (priority 2 is greater than 1). The zero-g volume will also still be applied because it is on a different layer.\n \nDefault value here is 0 which means this volume's priority will be evaluated against all other priority volumes regardless of their layer.", "format": "int32", "default": 0 }, From 9fa0b4606ebbce0d87afe2722579929121c08fb7 Mon Sep 17 00:00:00 2001 From: clay Date: Sun, 28 May 2023 19:51:44 -0400 Subject: [PATCH 16/30] fixed issue where having a signal inside a cloak and one with the same name outside a cloak would cause only one to be functional, also applied fix to quantum moon signals --- .../Builder/Props/Audio/SignalBuilder.cs | 21 ++++++++++--------- .../SignalPatches/AudioSignalPatches.cs | 4 ++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/NewHorizons/Builder/Props/Audio/SignalBuilder.cs b/NewHorizons/Builder/Props/Audio/SignalBuilder.cs index 2c366fd0..2fb84fd5 100644 --- a/NewHorizons/Builder/Props/Audio/SignalBuilder.cs +++ b/NewHorizons/Builder/Props/Audio/SignalBuilder.cs @@ -8,6 +8,7 @@ using OWML.Utils; using System.Collections.Generic; using UnityEngine; using NewHorizons.External.Modules.Props.Audio; +using System.Linq; namespace NewHorizons.Builder.Props.Audio { @@ -19,8 +20,8 @@ namespace NewHorizons.Builder.Props.Audio public static int NumberOfFrequencies; - private static List _qmSignals; - private static List _cloakedSignals; + private static List _qmSignals; + private static List _cloakedSignals; public static bool Initialized; @@ -35,20 +36,20 @@ namespace NewHorizons.Builder.Props.Audio }; NumberOfFrequencies = EnumUtils.GetValues().Length; - _qmSignals = new List() { SignalName.Quantum_QM }; - _cloakedSignals = new List(); + _qmSignals = new List() { SearchUtilities.Find("QuantumMoon_Body/Signal_Quantum").GetComponent() }; + _cloakedSignals = new List(); Initialized = true; } - public static bool IsCloaked(this SignalName signalName) + public static bool IsCloaked(this AudioSignal signal) { - return _cloakedSignals.Contains(signalName); + return _cloakedSignals.Contains(signal); } - public static bool IsOnQuantumMoon(this SignalName signalName) + public static bool IsOnQuantumMoon(this AudioSignal signal) { - return _qmSignals.Contains(signalName); + return _qmSignals.Contains(signal); } public static SignalFrequency AddFrequency(string str) @@ -149,8 +150,8 @@ namespace NewHorizons.Builder.Props.Audio signalGO.SetActive(true); // Track certain special signal things - if (planetGO.GetComponent()?.GetAstroObjectName() == AstroObject.Name.QuantumMoon) _qmSignals.Add(name); - if (info.insideCloak) _cloakedSignals.Add(name); + if (planetGO.GetComponent()?.GetAstroObjectName() == AstroObject.Name.QuantumMoon) _qmSignals.Add(audioSignal); + if (info.insideCloak) _cloakedSignals.Add(audioSignal); return signalGO; } diff --git a/NewHorizons/Patches/SignalPatches/AudioSignalPatches.cs b/NewHorizons/Patches/SignalPatches/AudioSignalPatches.cs index 068b1e1f..9f1aacfe 100644 --- a/NewHorizons/Patches/SignalPatches/AudioSignalPatches.cs +++ b/NewHorizons/Patches/SignalPatches/AudioSignalPatches.cs @@ -81,8 +81,8 @@ namespace NewHorizons.Patches.SignalPatches { if (!SignalBuilder.Initialized) return true; - var isCloaked = __instance._name.IsCloaked(); - var isOnQuantumMoon = __instance._name.IsOnQuantumMoon(); + var isCloaked = __instance.IsCloaked(); + var isOnQuantumMoon = __instance.IsOnQuantumMoon(); if (!isCloaked && !isOnQuantumMoon) return true; From 6382aed77c84f11ac0a284c7474a89598807a499 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 5 Jun 2023 17:53:34 -0700 Subject: [PATCH 17/30] Revert "Audio volume direction settings" This reverts commit df0a182a7827dafe29c0d656957d03de8d776fc8. --- NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs | 6 ------ .../Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs | 12 ------------ 2 files changed, 18 deletions(-) diff --git a/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs b/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs index 9b742f83..6b961a79 100644 --- a/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs @@ -3,7 +3,6 @@ using NewHorizons.External.Modules.Volumes.VolumeInfos; using NewHorizons.Utility; using NewHorizons.Utility.Files; using NewHorizons.Utility.OuterWilds; -using NewHorizons.Utility.OWML; using OWML.Common; using UnityEngine; @@ -25,11 +24,6 @@ namespace NewHorizons.Builder.Volumes owAudioSource.SetClipSelectionType(info.clipSelection.ConvertToOW()); owAudioSource.SetTrack(info.track.ConvertToOW()); AudioUtilities.SetAudioClip(owAudioSource, info.audio, mod); - Delay.FireOnNextUpdate(() => - { - owAudioSource.spatialBlend = info.spatialBlend ? 1 : 0; - owAudioSource.spread = info.spread; - }); var audioVolume = go.AddComponent(); audioVolume._layer = info.layer; diff --git a/NewHorizons/External/Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs b/NewHorizons/External/Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs index 42347ef2..6334ace0 100644 --- a/NewHorizons/External/Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs +++ b/NewHorizons/External/Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs @@ -52,18 +52,6 @@ namespace NewHorizons.External.Modules.Volumes.VolumeInfos /// Pause the music when exiting the volume. /// public bool pauseOnFadeOut; - - /// - /// Whether the audio sounds like it emits from the center of the volume. - /// - public bool spatialBlend; - - /// - /// If spatialBlend is true, how much does the direction of audio "spread" out from facing the center, between 0 and 180 degrees. - /// - [Range(0f, 180f)] - [DefaultValue(180f)] - public float spread = 180f; } } From 3377a45a2c7470f89896d9ff4864b323561ae2a4 Mon Sep 17 00:00:00 2001 From: Ben C Date: Tue, 6 Jun 2023 00:57:02 +0000 Subject: [PATCH 18/30] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 9a86f173..cbcb608a 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -3458,18 +3458,6 @@ "pauseOnFadeOut": { "type": "boolean", "description": "Pause the music when exiting the volume." - }, - "spatialBlend": { - "type": "boolean", - "description": "Whether the audio sounds like it emits from the center of the volume." - }, - "spread": { - "type": "number", - "description": "If spatialBlend is true, how much does the direction of audio \"spread\" out from facing the center, between 0 and 180 degrees.", - "format": "float", - "default": 180.0, - "maximum": 180.0, - "minimum": 0.0 } } }, From 19a53a3f7a533d03deafabb956f8bd8926785a6b Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 5 Jun 2023 17:58:35 -0700 Subject: [PATCH 19/30] bump manifest version --- NewHorizons/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/manifest.json b/NewHorizons/manifest.json index a295d1da..3154f875 100644 --- a/NewHorizons/manifest.json +++ b/NewHorizons/manifest.json @@ -4,7 +4,7 @@ "author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book", "name": "New Horizons", "uniqueName": "xen.NewHorizons", - "version": "1.11.0", + "version": "1.11.1", "owmlVersion": "2.9.0", "dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ], "conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ], From bdac8c8924dea6f44ac5b1daa53915c0d9f06970 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 5 Jun 2023 18:11:54 -0700 Subject: [PATCH 20/30] fix ConvertToOW for enums --- NewHorizons/External/SerializableEnums/NHFluidType.cs | 10 +++++----- NewHorizons/Utility/NewHorizonExtensions.cs | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/NewHorizons/External/SerializableEnums/NHFluidType.cs b/NewHorizons/External/SerializableEnums/NHFluidType.cs index f9eb0c83..f7b406f9 100644 --- a/NewHorizons/External/SerializableEnums/NHFluidType.cs +++ b/NewHorizons/External/SerializableEnums/NHFluidType.cs @@ -7,14 +7,14 @@ namespace NewHorizons.External.SerializableEnums [JsonConverter(typeof(StringEnumConverter))] public enum NHFluidType { - [EnumMember(Value = @"none")] None = 0, + [EnumMember(Value = @"none")] NONE = 0, - [EnumMember(Value = @"water")] Water = 1, + [EnumMember(Value = @"water")] WATER = 1, - [EnumMember(Value = @"cloud")] Cloud = 2, + [EnumMember(Value = @"cloud")] CLOUD = 2, - [EnumMember(Value = @"sand")] Sand = 3, + [EnumMember(Value = @"sand")] SAND = 3, - [EnumMember(Value = @"plasma")] Plasma = 4 + [EnumMember(Value = @"plasma")] PLASMA = 4 } } diff --git a/NewHorizons/Utility/NewHorizonExtensions.cs b/NewHorizons/Utility/NewHorizonExtensions.cs index a0a5303b..e8e2222c 100644 --- a/NewHorizons/Utility/NewHorizonExtensions.cs +++ b/NewHorizons/Utility/NewHorizonExtensions.cs @@ -255,13 +255,13 @@ namespace NewHorizons.Utility } public static FluidVolume.Type ConvertToOW(this NHFluidType fluidType, FluidVolume.Type @default = FluidVolume.Type.NONE) - => EnumUtils.Parse(fluidType.ToString().ToUpper(), @default); + => EnumUtils.Parse(fluidType.ToString(), @default); public static OWAudioMixer.TrackName ConvertToOW(this NHAudioMixerTrackName trackName, OWAudioMixer.TrackName @default = OWAudioMixer.TrackName.Environment) - => EnumUtils.Parse(trackName.ToString().ToUpper(), @default); + => EnumUtils.Parse(trackName.ToString(), @default); public static OWAudioSource.ClipSelectionOnPlay ConvertToOW(this NHClipSelectionType clipSelection, OWAudioSource.ClipSelectionOnPlay @default = OWAudioSource.ClipSelectionOnPlay.RANDOM) - => EnumUtils.Parse(clipSelection.ToString().ToUpper(), @default); + => EnumUtils.Parse(clipSelection.ToString(), @default); public static void SmoothLookDir(this GameObject go, Vector3 direction, float dt, float angularVelocity) { From 5ecaf5fa75efda89f21cb953602eecce2d6a29b8 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 5 Jun 2023 18:12:36 -0700 Subject: [PATCH 21/30] typo --- NewHorizons/External/Modules/AtmosphereModule.cs | 2 +- NewHorizons/External/Modules/Props/TornadoInfo.cs | 2 +- NewHorizons/External/Modules/RingModule.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NewHorizons/External/Modules/AtmosphereModule.cs b/NewHorizons/External/Modules/AtmosphereModule.cs index b93fbb65..b1f563ac 100644 --- a/NewHorizons/External/Modules/AtmosphereModule.cs +++ b/NewHorizons/External/Modules/AtmosphereModule.cs @@ -120,7 +120,7 @@ namespace NewHorizons.External.Modules /// /// Fluid type for sounds/effects when colliding with this cloud. /// - [DefaultValue("cloud")] public NHFluidType fluidType = NHFluidType.Cloud; + [DefaultValue("cloud")] public NHFluidType fluidType = NHFluidType.CLOUD; /// /// Add lightning to this planet like on Giant's Deep. diff --git a/NewHorizons/External/Modules/Props/TornadoInfo.cs b/NewHorizons/External/Modules/Props/TornadoInfo.cs index 60e9cbda..6ec121c4 100644 --- a/NewHorizons/External/Modules/Props/TornadoInfo.cs +++ b/NewHorizons/External/Modules/Props/TornadoInfo.cs @@ -68,7 +68,7 @@ namespace NewHorizons.External.Modules.Props /// /// Fluid type for sounds/effects when colliding with this tornado. /// - [DefaultValue("cloud")] public NHFluidType fluidType = NHFluidType.Cloud; + [DefaultValue("cloud")] public NHFluidType fluidType = NHFluidType.CLOUD; } } diff --git a/NewHorizons/External/Modules/RingModule.cs b/NewHorizons/External/Modules/RingModule.cs index 3fa16675..ab4dac2c 100644 --- a/NewHorizons/External/Modules/RingModule.cs +++ b/NewHorizons/External/Modules/RingModule.cs @@ -12,7 +12,7 @@ namespace NewHorizons.External.Modules /// /// Fluid type for sounds/effects when colliding with this ring. /// - public NHFluidType fluidType = NHFluidType.None; + public NHFluidType fluidType = NHFluidType.NONE; /// /// Angle between the rings and the equatorial plane of the planet. From 60e1c22372e77e351a6816973494faeeda8e11d5 Mon Sep 17 00:00:00 2001 From: Ben C Date: Tue, 6 Jun 2023 01:14:53 +0000 Subject: [PATCH 22/30] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index cbcb608a..2715e81b 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -484,11 +484,11 @@ "type": "string", "description": "", "x-enumNames": [ - "None", - "Water", - "Cloud", - "Sand", - "Plasma" + "NONE", + "WATER", + "CLOUD", + "SAND", + "PLASMA" ], "enum": [ "none", From 114bb35cdc61ba5ebb5d1bf5d2b21764b2695c52 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 5 Jun 2023 18:35:11 -0700 Subject: [PATCH 23/30] doc --- NewHorizons/External/Modules/Props/Audio/AudioSourceInfo.cs | 3 ++- .../External/Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NewHorizons/External/Modules/Props/Audio/AudioSourceInfo.cs b/NewHorizons/External/Modules/Props/Audio/AudioSourceInfo.cs index d2579780..09bff572 100644 --- a/NewHorizons/External/Modules/Props/Audio/AudioSourceInfo.cs +++ b/NewHorizons/External/Modules/Props/Audio/AudioSourceInfo.cs @@ -8,7 +8,8 @@ namespace NewHorizons.External.Modules.Props.Audio public class AudioSourceInfo : BaseAudioInfo { /// - /// The audio track of this audio source + /// The audio track of this audio source. + /// Most of the time you'll use environment (the default) for sound effects and music for music. /// [DefaultValue("environment")] public NHAudioMixerTrackName track = NHAudioMixerTrackName.Environment; } diff --git a/NewHorizons/External/Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs b/NewHorizons/External/Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs index 6334ace0..2d302218 100644 --- a/NewHorizons/External/Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs +++ b/NewHorizons/External/Modules/Volumes/VolumeInfos/AudioVolumeInfo.cs @@ -16,7 +16,8 @@ namespace NewHorizons.External.Modules.Volumes.VolumeInfos [DefaultValue("random")] public NHClipSelectionType clipSelection = NHClipSelectionType.RANDOM; /// - /// The audio track of this audio volume + /// The audio track of this audio volume. + /// Most of the time you'll use environment (the default) for sound effects and music for music. /// [DefaultValue("environment")] public NHAudioMixerTrackName track = NHAudioMixerTrackName.Environment; From 23690130506b0f2acba7fe65bdec54f819b3e6c9 Mon Sep 17 00:00:00 2001 From: Ben C Date: Tue, 6 Jun 2023 01:38:05 +0000 Subject: [PATCH 24/30] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 2715e81b..e6a1e5be 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -2690,7 +2690,7 @@ "description": "An optional rename of this object" }, "track": { - "description": "The audio track of this audio source", + "description": "The audio track of this audio source.\nMost of the time you'll use environment (the default) for sound effects and music for music. ", "default": "environment", "$ref": "#/definitions/NHAudioMixerTrackName" } @@ -3424,7 +3424,7 @@ "$ref": "#/definitions/NHClipSelectionType" }, "track": { - "description": "The audio track of this audio volume", + "description": "The audio track of this audio volume.\nMost of the time you'll use environment (the default) for sound effects and music for music. ", "default": "environment", "$ref": "#/definitions/NHAudioMixerTrackName" }, From 5e2eedde15d8e8c6a82ee8dad212af0714e5f48a Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 5 Jun 2023 19:51:55 -0700 Subject: [PATCH 25/30] make volume layers match base game --- NewHorizons/Builder/Atmosphere/AirBuilder.cs | 3 ++- NewHorizons/Builder/Atmosphere/CloudsBuilder.cs | 1 + NewHorizons/Builder/Body/WaterBuilder.cs | 9 ++++++--- NewHorizons/Builder/General/GravityBuilder.cs | 3 ++- NewHorizons/External/Modules/VariableSize/WaterModule.cs | 4 ++-- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/NewHorizons/Builder/Atmosphere/AirBuilder.cs b/NewHorizons/Builder/Atmosphere/AirBuilder.cs index 33912f0a..8d502f88 100644 --- a/NewHorizons/Builder/Atmosphere/AirBuilder.cs +++ b/NewHorizons/Builder/Atmosphere/AirBuilder.cs @@ -16,9 +16,10 @@ namespace NewHorizons.Builder.Atmosphere sc.isTrigger = true; sc.radius = config.Atmosphere.size; + // copied from gd var sfv = airGO.AddComponent(); sfv._layer = 5; - sfv._priority = 1; + sfv._priority = 0; sfv._density = 1.2f; sfv._fluidType = FluidVolume.Type.AIR; sfv._allowShipAutoroll = true; diff --git a/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs b/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs index 3fa30b09..603ff42a 100644 --- a/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs +++ b/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs @@ -131,6 +131,7 @@ namespace NewHorizons.Builder.Atmosphere OWShellCollider fluidOWSC = cloudsFluidGO.AddComponent(); fluidOWSC._innerRadius = atmo.size * 0.9f; + // copied from gd CloudLayerFluidVolume fluidCLFV = cloudsFluidGO.AddComponent(); fluidCLFV._layer = 5; fluidCLFV._priority = 1; diff --git a/NewHorizons/Builder/Body/WaterBuilder.cs b/NewHorizons/Builder/Body/WaterBuilder.cs index 33e2ac5a..8bda6c80 100644 --- a/NewHorizons/Builder/Body/WaterBuilder.cs +++ b/NewHorizons/Builder/Body/WaterBuilder.cs @@ -104,7 +104,7 @@ namespace NewHorizons.Builder.Body buoyancyObject.layer = Layer.BasicEffectVolume; var sphereCollider = buoyancyObject.AddComponent(); - sphereCollider.radius = 1; + sphereCollider.radius = 1; // scaled by localScale sphereCollider.isTrigger = true; var owCollider = buoyancyObject.AddComponent(); @@ -114,14 +114,17 @@ namespace NewHorizons.Builder.Body var buoyancyTriggerVolume = buoyancyObject.AddComponent(); buoyancyTriggerVolume._owCollider = owCollider; + // copied from gd var fluidVolume = buoyancyObject.AddComponent(); fluidVolume._fluidType = FluidVolume.Type.WATER; - fluidVolume._attachedBody = rb; + fluidVolume._allowShipAutoroll = true; + fluidVolume._disableOnStart = false; fluidVolume._triggerVolume = buoyancyTriggerVolume; fluidVolume._radius = waterSize; fluidVolume._buoyancyDensity = module.buoyancy; fluidVolume._density = module.density; - fluidVolume._layer = LayerMask.NameToLayer("BasicEffectVolume"); + fluidVolume._layer = 5; + fluidVolume._priority = 3; var fogGO = Object.Instantiate(_oceanFog, waterGO.transform); fogGO.name = "OceanFog"; diff --git a/NewHorizons/Builder/General/GravityBuilder.cs b/NewHorizons/Builder/General/GravityBuilder.cs index 2023f78e..922cfee8 100644 --- a/NewHorizons/Builder/General/GravityBuilder.cs +++ b/NewHorizons/Builder/General/GravityBuilder.cs @@ -35,8 +35,9 @@ namespace NewHorizons.Builder.General var owTriggerVolume = gravityGO.AddComponent(); + // copied from th and qm var gravityVolume = gravityGO.AddComponent(); - gravityVolume._cutoffAcceleration = 0.1f; + gravityVolume._cutoffAcceleration = 0f; var falloff = config.Base.gravityFallOff == GravityFallOff.Linear? GravityVolume.FalloffType.linear : GravityVolume.FalloffType.inverseSquared; diff --git a/NewHorizons/External/Modules/VariableSize/WaterModule.cs b/NewHorizons/External/Modules/VariableSize/WaterModule.cs index baa348b7..3443f162 100644 --- a/NewHorizons/External/Modules/VariableSize/WaterModule.cs +++ b/NewHorizons/External/Modules/VariableSize/WaterModule.cs @@ -15,12 +15,12 @@ namespace NewHorizons.External.Modules.VariableSize /// /// Density of the water sphere. The higher the density, the harder it is to go through this fluid. /// - [DefaultValue(1.2f)] public float density = 1.2f; + [DefaultValue(30f)] public float density = 30f; /// /// Buoyancy density of the water sphere /// - [DefaultValue(1f)] public float buoyancy = 1f; + [DefaultValue(1.1f)] public float buoyancy = 1.1f; /// /// Tint of the water From adabec3cfa6ff0b41f90c2cccd2d85b9033347a2 Mon Sep 17 00:00:00 2001 From: Ben C Date: Tue, 6 Jun 2023 02:57:40 +0000 Subject: [PATCH 26/30] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index e6a1e5be..896451a8 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -3226,13 +3226,13 @@ "type": "number", "description": "Density of the water sphere. The higher the density, the harder it is to go through this fluid.", "format": "float", - "default": 1.2 + "default": 30.0 }, "buoyancy": { "type": "number", "description": "Buoyancy density of the water sphere", "format": "float", - "default": 1.0 + "default": 1.1 }, "tint": { "description": "Tint of the water", From 722442a4ac073241490eb6a2a58268f849b4572a Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 5 Jun 2023 20:11:44 -0700 Subject: [PATCH 27/30] clouds: use inner and outer radius for volume --- NewHorizons/Builder/Atmosphere/CloudsBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs b/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs index 603ff42a..ba3482aa 100644 --- a/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs +++ b/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs @@ -126,10 +126,10 @@ namespace NewHorizons.Builder.Atmosphere SphereCollider fluidSC = cloudsFluidGO.AddComponent(); fluidSC.isTrigger = true; - fluidSC.radius = atmo.size; + fluidSC.radius = atmo.clouds.outerCloudRadius; OWShellCollider fluidOWSC = cloudsFluidGO.AddComponent(); - fluidOWSC._innerRadius = atmo.size * 0.9f; + fluidOWSC._innerRadius = atmo.clouds.innerCloudRadius; // copied from gd CloudLayerFluidVolume fluidCLFV = cloudsFluidGO.AddComponent(); From 9441824877d63c9af99c3124cd3dc4a562f739e5 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 5 Jun 2023 20:36:35 -0700 Subject: [PATCH 28/30] oops --- NewHorizons/Builder/Body/WaterBuilder.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Builder/Body/WaterBuilder.cs b/NewHorizons/Builder/Body/WaterBuilder.cs index 8bda6c80..3039d6dd 100644 --- a/NewHorizons/Builder/Body/WaterBuilder.cs +++ b/NewHorizons/Builder/Body/WaterBuilder.cs @@ -117,14 +117,15 @@ namespace NewHorizons.Builder.Body // copied from gd var fluidVolume = buoyancyObject.AddComponent(); fluidVolume._fluidType = FluidVolume.Type.WATER; - fluidVolume._allowShipAutoroll = true; - fluidVolume._disableOnStart = false; + fluidVolume._attachedBody = rb; fluidVolume._triggerVolume = buoyancyTriggerVolume; fluidVolume._radius = waterSize; fluidVolume._buoyancyDensity = module.buoyancy; fluidVolume._density = module.density; fluidVolume._layer = 5; fluidVolume._priority = 3; + fluidVolume._allowShipAutoroll = true; + fluidVolume._disableOnStart = false; var fogGO = Object.Instantiate(_oceanFog, waterGO.transform); fogGO.name = "OceanFog"; From 94220128e129e569ed6789904154880c822864d6 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 12 Jun 2023 17:38:34 -0700 Subject: [PATCH 29/30] add the comment xen wanted --- NewHorizons/Builder/Body/BrambleDimensionBuilder.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs b/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs index c1f46b2d..d51b6f73 100644 --- a/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs +++ b/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs @@ -247,6 +247,7 @@ namespace NewHorizons.Builder.Body Delay.FireOnNextUpdate(() => { // Cull stuff + // this in in the delay because it fixes #588 var cullController = go.AddComponent(); cullController.SetSector(sector); From 8e9cd7c3c6cbc7d4908caef05a3d4457f7f643ae Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 12 Jun 2023 17:39:44 -0700 Subject: [PATCH 30/30] use issue number instead of pr number --- NewHorizons/Builder/Body/BrambleDimensionBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs b/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs index d51b6f73..f92d1daf 100644 --- a/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs +++ b/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs @@ -247,7 +247,7 @@ namespace NewHorizons.Builder.Body Delay.FireOnNextUpdate(() => { // Cull stuff - // this in in the delay because it fixes #588 + // this in in the delay because it fixes #562 var cullController = go.AddComponent(); cullController.SetSector(sector);