From 6a4777749751208671e7a1f99c2d4bc8fff27a53 Mon Sep 17 00:00:00 2001 From: xen-42 Date: Wed, 2 Oct 2024 22:10:42 -0400 Subject: [PATCH 01/17] Fix #941 --- NewHorizons/Builder/Body/ProxyBuilder.cs | 6 ++++++ NewHorizons/External/Modules/BaseModule.cs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/NewHorizons/Builder/Body/ProxyBuilder.cs b/NewHorizons/Builder/Body/ProxyBuilder.cs index c788c3b2..f1567659 100644 --- a/NewHorizons/Builder/Body/ProxyBuilder.cs +++ b/NewHorizons/Builder/Body/ProxyBuilder.cs @@ -96,6 +96,12 @@ namespace NewHorizons.Builder.Body // We want to take the largest size I think var realSize = body.Config.Base.surfaceSize; + if (realSize <= 0) + { + // #941 handle proxy body edge case when all scales = 0 + realSize = 1; + } + if (body.Config.HeightMap != null) { HeightMapBuilder.Make(proxy, null, body.Config.HeightMap, body.Mod, 20); diff --git a/NewHorizons/External/Modules/BaseModule.cs b/NewHorizons/External/Modules/BaseModule.cs index 78a41fee..1d19d4c6 100644 --- a/NewHorizons/External/Modules/BaseModule.cs +++ b/NewHorizons/External/Modules/BaseModule.cs @@ -58,6 +58,8 @@ namespace NewHorizons.External.Modules /// /// A scale height used for a number of things. Should be the approximate radius of the body. + /// + /// Affected settings include: Base sector size, proxy body scaling, surface gravity /// public float surfaceSize; From 508d1780f72263530afce15545fd4cbe61b2c61a Mon Sep 17 00:00:00 2001 From: Ben C Date: Thu, 3 Oct 2024 02:12:00 +0000 Subject: [PATCH 02/17] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 1f2fd960..0a31bf6a 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -568,7 +568,7 @@ }, "surfaceSize": { "type": "number", - "description": "A scale height used for a number of things. Should be the approximate radius of the body.", + "description": "A scale height used for a number of things. Should be the approximate radius of the body.\n\nAffected settings include: Base sector size, proxy body scaling, surface gravity", "format": "float" }, "gravityVolumePriority": { From 676fc3672d31e0e53ddc9311d187f703f8000ed6 Mon Sep 17 00:00:00 2001 From: xen-42 Date: Wed, 2 Oct 2024 22:13:24 -0400 Subject: [PATCH 03/17] Fix #940 --- NewHorizons/Builder/Props/DetailBuilder.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NewHorizons/Builder/Props/DetailBuilder.cs b/NewHorizons/Builder/Props/DetailBuilder.cs index 89d0887b..66a4c9de 100644 --- a/NewHorizons/Builder/Props/DetailBuilder.cs +++ b/NewHorizons/Builder/Props/DetailBuilder.cs @@ -67,6 +67,8 @@ namespace NewHorizons.Builder.Props /// public static GameObject Make(GameObject planetGO, Sector sector, IModBehaviour mod, DetailInfo info) { + if (sector == null) info.keepLoaded = true; + if (info.assetBundle != null) { // Shouldn't happen @@ -98,6 +100,8 @@ namespace NewHorizons.Builder.Props { if (prefab == null) return null; + if (sector == null) detail.keepLoaded = true; + GameObject prop; bool isItem; bool invalidComponentFound = false; From 95bd1f78e2c8f36131f66cd8352757e5c97dcdb3 Mon Sep 17 00:00:00 2001 From: xen-42 Date: Wed, 2 Oct 2024 22:25:26 -0400 Subject: [PATCH 04/17] Fix #933 probably --- NewHorizons/Builder/General/AstroObjectBuilder.cs | 4 ++++ NewHorizons/Handlers/PlanetCreationHandler.cs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Builder/General/AstroObjectBuilder.cs b/NewHorizons/Builder/General/AstroObjectBuilder.cs index 21be3536..89b5c041 100644 --- a/NewHorizons/Builder/General/AstroObjectBuilder.cs +++ b/NewHorizons/Builder/General/AstroObjectBuilder.cs @@ -8,6 +8,8 @@ namespace NewHorizons.Builder.General { public static class AstroObjectBuilder { + public static GameObject CenterOfUniverse { get; private set; } + public static NHAstroObject Make(GameObject body, AstroObject primaryBody, NewHorizonsBody nhBody, bool isVanilla) { NHAstroObject astroObject = body.AddComponent(); @@ -62,6 +64,8 @@ namespace NewHorizons.Builder.General if (config.Base.centerOfSolarSystem) { + CenterOfUniverse = body; + NHLogger.Log($"Setting center of universe to {config.name}"); Delay.RunWhen( diff --git a/NewHorizons/Handlers/PlanetCreationHandler.cs b/NewHorizons/Handlers/PlanetCreationHandler.cs index fda247e7..380e4673 100644 --- a/NewHorizons/Handlers/PlanetCreationHandler.cs +++ b/NewHorizons/Handlers/PlanetCreationHandler.cs @@ -421,8 +421,8 @@ namespace NewHorizons.Handlers if (defaultPrimaryToSun) { NHLogger.LogError($"Couldn't find {body.Config.Orbit.primaryBody}, defaulting to center of solar system"); - // TODO: Make this work in other systems. We tried using Locator.GetCenterOfUniverse before but that doesn't work since its too early now - primaryBody = SearchUtilities.Find("Sun_Body")?.GetComponent(); + // Fix #933 not defaulting primary body + primaryBody = (SearchUtilities.Find("Sun_Body") ?? AstroObjectBuilder.CenterOfUniverse)?.GetComponent(); } else { From 95cd20fca7c6151996826d005eea942a7a274e1d Mon Sep 17 00:00:00 2001 From: xen-42 Date: Wed, 2 Oct 2024 23:36:32 -0400 Subject: [PATCH 05/17] Fix Disappearing Signalscope UI #934 after warping to new system wearing suit --- NewHorizons/Builder/General/SpawnPointBuilder.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/NewHorizons/Builder/General/SpawnPointBuilder.cs b/NewHorizons/Builder/General/SpawnPointBuilder.cs index cc7feddf..460350f1 100644 --- a/NewHorizons/Builder/General/SpawnPointBuilder.cs +++ b/NewHorizons/Builder/General/SpawnPointBuilder.cs @@ -4,6 +4,7 @@ using NewHorizons.Utility; using NewHorizons.Utility.OuterWilds; using NewHorizons.Utility.OWML; using System; +using System.Collections; using System.Linq; using System.Reflection; using UnityEngine; @@ -87,8 +88,22 @@ namespace NewHorizons.Builder.General handler.Method.Invoke(handler.Target, new object[] { command }); } spv._interactVolume._listInteractions.First(x => x.promptText == UITextType.SuitUpPrompt).interactionEnabled = true; + + // Fix Disappearing Signalscope UI #934 after warping to new system wearing suit + Delay.StartCoroutine(SignalScopeZoomCoroutine()); } } } + + private static IEnumerator SignalScopeZoomCoroutine() + { + while (!Locator.GetToolModeSwapper().GetSignalScope().InZoomMode()) + { + yield return new WaitForEndOfFrame(); + } + yield return null; + Locator.GetToolModeSwapper().GetSignalScope().ExitSignalscopeZoom(); + Locator.GetToolModeSwapper().GetSignalScope().EnterSignalscopeZoom(); + } } } From 72b7a86294025bfea296b2869c989685ce3f9281 Mon Sep 17 00:00:00 2001 From: xen-42 Date: Wed, 2 Oct 2024 23:45:14 -0400 Subject: [PATCH 06/17] subtitles start cycling before the main menu is visible #844 --- NewHorizons/Handlers/SubtitlesHandler.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/NewHorizons/Handlers/SubtitlesHandler.cs b/NewHorizons/Handlers/SubtitlesHandler.cs index d3fe3fb8..9fd87d44 100644 --- a/NewHorizons/Handlers/SubtitlesHandler.cs +++ b/NewHorizons/Handlers/SubtitlesHandler.cs @@ -1,3 +1,4 @@ +using NewHorizons.Utility; using NewHorizons.Utility.Files; using NewHorizons.Utility.OWML; using OWML.Common; @@ -31,6 +32,8 @@ namespace NewHorizons.Handlers private static List<(IModBehaviour mod, string filePath)> _additionalSubtitles = new(); + private CanvasGroup _titleCanvasGroup; + public static void RegisterAdditionalSubtitle(IModBehaviour mod, string filePath) { _additionalSubtitles.Add((mod, filePath)); @@ -64,6 +67,8 @@ namespace NewHorizons.Handlers var layout = GetComponent(); layout.minHeight = SUBTITLE_HEIGHT; + _titleCanvasGroup = SearchUtilities.Find("TitleCanvas").GetComponent(); + CheckForEOTE(); // We add our subtitles as a child object so that their sizing doesnt shift the layout of the main menu @@ -137,6 +142,12 @@ namespace NewHorizons.Handlers return; } + // Fix subtitles start cycling before the main menu is visible #844 + if (_titleCanvasGroup.alpha < 1) + { + return; + } + if (pauseTimer > 0) { pauseTimer--; From 51ea50ac68ca8ba67d034cb3b2057b93773fc927 Mon Sep 17 00:00:00 2001 From: xen-42 Date: Wed, 2 Oct 2024 23:54:18 -0400 Subject: [PATCH 07/17] Add allowShipAutoroll to Atmosphere and Water modules #935 --- NewHorizons/Builder/Atmosphere/AirBuilder.cs | 2 +- NewHorizons/Builder/Atmosphere/CloudsBuilder.cs | 2 +- NewHorizons/Builder/Body/WaterBuilder.cs | 2 +- NewHorizons/External/Modules/AtmosphereModule.cs | 6 ++++++ NewHorizons/External/Modules/VariableSize/WaterModule.cs | 6 ++++++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/NewHorizons/Builder/Atmosphere/AirBuilder.cs b/NewHorizons/Builder/Atmosphere/AirBuilder.cs index 8d502f88..979bd933 100644 --- a/NewHorizons/Builder/Atmosphere/AirBuilder.cs +++ b/NewHorizons/Builder/Atmosphere/AirBuilder.cs @@ -22,7 +22,7 @@ namespace NewHorizons.Builder.Atmosphere sfv._priority = 0; sfv._density = 1.2f; sfv._fluidType = FluidVolume.Type.AIR; - sfv._allowShipAutoroll = true; + sfv._allowShipAutoroll = config.Atmosphere.allowShipAutoroll; sfv._disableOnStart = false; if (config.Atmosphere.hasShockLayer) diff --git a/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs b/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs index ceef7fd5..5e998cf3 100644 --- a/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs +++ b/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs @@ -147,7 +147,7 @@ namespace NewHorizons.Builder.Atmosphere fluidCLFV._priority = 1; fluidCLFV._density = 1.2f; fluidCLFV._fluidType = atmo.clouds.fluidType.ConvertToOW(FluidVolume.Type.CLOUD); - fluidCLFV._allowShipAutoroll = true; + fluidCLFV._allowShipAutoroll = atmo.allowShipAutoroll; fluidCLFV._disableOnStart = false; // Fix the rotations once the rest is done diff --git a/NewHorizons/Builder/Body/WaterBuilder.cs b/NewHorizons/Builder/Body/WaterBuilder.cs index 8eba73c0..b53b4617 100644 --- a/NewHorizons/Builder/Body/WaterBuilder.cs +++ b/NewHorizons/Builder/Body/WaterBuilder.cs @@ -129,7 +129,7 @@ namespace NewHorizons.Builder.Body fluidVolume._density = module.density; fluidVolume._layer = 5; fluidVolume._priority = 3; - fluidVolume._allowShipAutoroll = true; + fluidVolume._allowShipAutoroll = module.allowShipAutoroll; fluidVolume._disableOnStart = false; var fogGO = Object.Instantiate(_oceanFog, waterGO.transform); diff --git a/NewHorizons/External/Modules/AtmosphereModule.cs b/NewHorizons/External/Modules/AtmosphereModule.cs index e318f372..eb31dac2 100644 --- a/NewHorizons/External/Modules/AtmosphereModule.cs +++ b/NewHorizons/External/Modules/AtmosphereModule.cs @@ -107,6 +107,12 @@ namespace NewHorizons.External.Modules /// [DefaultValue(300f)] public float maxShockSpeed = 300f; + /// + /// Will the ship automatically try to orient itself to face upwards while in this volume? + /// + [DefaultValue(true)] + public bool allowShipAutoroll = true; + [JsonObject] public class CloudInfo { diff --git a/NewHorizons/External/Modules/VariableSize/WaterModule.cs b/NewHorizons/External/Modules/VariableSize/WaterModule.cs index 3443f162..d28ffb7c 100644 --- a/NewHorizons/External/Modules/VariableSize/WaterModule.cs +++ b/NewHorizons/External/Modules/VariableSize/WaterModule.cs @@ -26,5 +26,11 @@ namespace NewHorizons.External.Modules.VariableSize /// Tint of the water /// public MColor tint; + + /// + /// Will the ship automatically try to orient itself to face upwards while in this volume? + /// + [DefaultValue(true)] + public bool allowShipAutoroll = true; } } \ No newline at end of file From e0869897e3920d6652b9e512a24e396b5cb27666 Mon Sep 17 00:00:00 2001 From: Ben C Date: Thu, 3 Oct 2024 03:55:54 +0000 Subject: [PATCH 08/17] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 0a31bf6a..cd38cdee 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -409,6 +409,11 @@ "description": "Maximum speed that your ship can go in the atmosphere where flames will appear at their brightest.", "format": "float", "default": 300.0 + }, + "allowShipAutoroll": { + "type": "boolean", + "description": "Will the ship automatically try to orient itself to face upwards while in this volume?", + "default": true } } }, @@ -3907,6 +3912,11 @@ "tint": { "description": "Tint of the water", "$ref": "#/definitions/MColor" + }, + "allowShipAutoroll": { + "type": "boolean", + "description": "Will the ship automatically try to orient itself to face upwards while in this volume?", + "default": true } } }, From bd1abecb879c09e50b9be0a7cc2a2205275818f0 Mon Sep 17 00:00:00 2001 From: xen-42 Date: Thu, 3 Oct 2024 00:02:20 -0400 Subject: [PATCH 09/17] Fix subtitle with small dimensions not getting created #893 --- NewHorizons/External/Configs/AddonConfig.cs | 1 + NewHorizons/Handlers/SubtitlesHandler.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NewHorizons/External/Configs/AddonConfig.cs b/NewHorizons/External/Configs/AddonConfig.cs index cfcc731b..a3e39452 100644 --- a/NewHorizons/External/Configs/AddonConfig.cs +++ b/NewHorizons/External/Configs/AddonConfig.cs @@ -41,6 +41,7 @@ namespace NewHorizons.External.Configs /// /// The path to the addons subtitle for the main menu. /// Defaults to "subtitle.png". + /// The dimensions of the Echos of the Eye subtitle is 669 x 67, so aim for that size /// public string subtitlePath = "subtitle.png"; } diff --git a/NewHorizons/Handlers/SubtitlesHandler.cs b/NewHorizons/Handlers/SubtitlesHandler.cs index 9fd87d44..1a42bc79 100644 --- a/NewHorizons/Handlers/SubtitlesHandler.cs +++ b/NewHorizons/Handlers/SubtitlesHandler.cs @@ -109,7 +109,7 @@ namespace NewHorizons.Handlers var tex = ImageUtilities.GetTexture(mod, filepath, false); if (tex == null) return; - var sprite = Sprite.Create(tex, new Rect(0.0f, 0.0f, tex.width, Mathf.Max(SUBTITLE_HEIGHT, tex.height)), new Vector2(0.5f, 0.5f), 100.0f); + var sprite = Sprite.Create(tex, new Rect(0.0f, 0.0f, tex.width, tex.height), new Vector2(0.5f, 0.5f), 100.0f); AddSubtitle(sprite); } From 05aa5d76ec7f5a40f5fb9803d666748947b76b3c Mon Sep 17 00:00:00 2001 From: Ben C Date: Thu, 3 Oct 2024 04:04:27 +0000 Subject: [PATCH 10/17] Updated Schemas --- NewHorizons/Schemas/addon_manifest_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/Schemas/addon_manifest_schema.json b/NewHorizons/Schemas/addon_manifest_schema.json index dec9022f..cc16e431 100644 --- a/NewHorizons/Schemas/addon_manifest_schema.json +++ b/NewHorizons/Schemas/addon_manifest_schema.json @@ -36,7 +36,7 @@ }, "subtitlePath": { "type": "string", - "description": "The path to the addons subtitle for the main menu.\nDefaults to \"subtitle.png\"." + "description": "The path to the addons subtitle for the main menu.\nDefaults to \"subtitle.png\".\nThe dimensions of the Echos of the Eye subtitle is 669 x 67, so aim for that size" }, "$schema": { "type": "string", From 405164596553eb515e265414ee5c6802a9aced5b Mon Sep 17 00:00:00 2001 From: xen-42 Date: Thu, 3 Oct 2024 00:05:30 -0400 Subject: [PATCH 11/17] Add documentation of naming scheme for alt ship log images #848 --- NewHorizons/Schemas/shiplog_schema.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/Schemas/shiplog_schema.xsd b/NewHorizons/Schemas/shiplog_schema.xsd index 1c68acde..213cc157 100644 --- a/NewHorizons/Schemas/shiplog_schema.xsd +++ b/NewHorizons/Schemas/shiplog_schema.xsd @@ -81,7 +81,7 @@ - If this fact is revealed, show the Alt picture + If this fact is revealed, show the Alt picture. Alt photos use the same file name as default but suffixed with "_alt" From c9fa785ac6ee829f5a131814bcfc8d7d3cf66dd4 Mon Sep 17 00:00:00 2001 From: xen-42 Date: Thu, 3 Oct 2024 00:10:51 -0400 Subject: [PATCH 12/17] Replaced invulernableToSun to hasFluidDetector, document anglerfish behaviour (#830) --- NewHorizons/Builder/General/AstroObjectBuilder.cs | 2 +- NewHorizons/Builder/General/DetectorBuilder.cs | 2 +- NewHorizons/External/Configs/PlanetConfig.cs | 7 ++++++- NewHorizons/External/Modules/BaseModule.cs | 9 +++++++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/NewHorizons/Builder/General/AstroObjectBuilder.cs b/NewHorizons/Builder/General/AstroObjectBuilder.cs index 89b5c041..15f00d62 100644 --- a/NewHorizons/Builder/General/AstroObjectBuilder.cs +++ b/NewHorizons/Builder/General/AstroObjectBuilder.cs @@ -19,7 +19,7 @@ namespace NewHorizons.Builder.General astroObject.isVanilla = isVanilla; astroObject.HideDisplayName = !config.MapMarker.enabled; - astroObject.invulnerableToSun = config.Base.invulnerableToSun; + astroObject.invulnerableToSun = !config.Base.hasFluidDetector; if (config.Orbit != null) astroObject.SetOrbitalParametersFromConfig(config.Orbit); diff --git a/NewHorizons/Builder/General/DetectorBuilder.cs b/NewHorizons/Builder/General/DetectorBuilder.cs index 4a62d5b6..034a7e07 100644 --- a/NewHorizons/Builder/General/DetectorBuilder.cs +++ b/NewHorizons/Builder/General/DetectorBuilder.cs @@ -90,7 +90,7 @@ namespace NewHorizons.Builder.General OWRB.RegisterAttachedForceDetector(forceDetector); // For falling into sun - if (!config.Base.invulnerableToSun && config.Star == null && config.FocalPoint == null) + if (config.Base.hasFluidDetector && config.Star == null && config.FocalPoint == null) { detectorGO.layer = Layer.AdvancedDetector; diff --git a/NewHorizons/External/Configs/PlanetConfig.cs b/NewHorizons/External/Configs/PlanetConfig.cs index 28f00318..712c4872 100644 --- a/NewHorizons/External/Configs/PlanetConfig.cs +++ b/NewHorizons/External/Configs/PlanetConfig.cs @@ -281,7 +281,7 @@ namespace NewHorizons.External.Configs } // Stars and focal points shouldnt be destroyed by stars - if (Star != null || FocalPoint != null) Base.invulnerableToSun = true; + if (Star != null || FocalPoint != null) Base.hasFluidDetector = false; } public void Migrate() @@ -664,6 +664,11 @@ namespace NewHorizons.External.Configs if (destructionVolume.onlyAffectsPlayerAndShip) destructionVolume.onlyAffectsPlayerRelatedBodies = true; } } + + if (Base.invulnerableToSun) + { + Base.hasFluidDetector = false; + } } #endregion } diff --git a/NewHorizons/External/Modules/BaseModule.cs b/NewHorizons/External/Modules/BaseModule.cs index 1d19d4c6..01ddd024 100644 --- a/NewHorizons/External/Modules/BaseModule.cs +++ b/NewHorizons/External/Modules/BaseModule.cs @@ -37,9 +37,11 @@ namespace NewHorizons.External.Modules public float groundSize; /// - /// Can this planet survive entering a star? + /// Is this planet able to detect fluid volumes? Disabling this means that entering a star or lava volume will not destroy this planet + /// May have adverse effects if anglerfish are added to this planet, disable this if you want those to work (they have fluid volumes in their mouths) /// - public bool invulnerableToSun; + [DefaultValue(true)] + public bool hasFluidDetector = true; /// /// Do we show the minimap when walking around this planet? @@ -84,6 +86,9 @@ namespace NewHorizons.External.Modules #region Obsolete + [Obsolete("invulnerableToSun is deprecated, please use hasFluidDetector instead")] + public bool invulnerableToSun; + [Obsolete("IsSatellite is deprecated, please use ShowMinimap instead")] public bool isSatellite; From 1d0ede59b74f1409a3aaed13fa4c911cccb625fd Mon Sep 17 00:00:00 2001 From: Ben C Date: Thu, 3 Oct 2024 04:12:13 +0000 Subject: [PATCH 13/17] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index cd38cdee..8cd8e1e7 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -552,9 +552,10 @@ "description": "Radius of a simple sphere used as the ground for the planet. If you want to use more complex terrain, leave this as\n0.", "format": "float" }, - "invulnerableToSun": { + "hasFluidDetector": { "type": "boolean", - "description": "Can this planet survive entering a star?" + "description": "Is this planet able to detect fluid volumes? Disabling this means that entering a star or lava volume will not destroy this planet\nMay have adverse effects if anglerfish are added to this planet, disable this if you want those to work (they have fluid volumes in their mouths)", + "default": true }, "showMinimap": { "type": "boolean", From 96a08d410e8732a7c2d7c7d138df295e6a7e17e7 Mon Sep 17 00:00:00 2001 From: xen-42 Date: Thu, 3 Oct 2024 00:14:41 -0400 Subject: [PATCH 14/17] Log a warning if you do the anglerfish thing --- NewHorizons/Builder/Props/DetailBuilder.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/NewHorizons/Builder/Props/DetailBuilder.cs b/NewHorizons/Builder/Props/DetailBuilder.cs index 66a4c9de..e49feeee 100644 --- a/NewHorizons/Builder/Props/DetailBuilder.cs +++ b/NewHorizons/Builder/Props/DetailBuilder.cs @@ -1,5 +1,6 @@ using NewHorizons.Builder.General; using NewHorizons.Components; +using NewHorizons.Components.Orbital; using NewHorizons.Components.Props; using NewHorizons.External.Modules.Props; using NewHorizons.Handlers; @@ -374,6 +375,12 @@ namespace NewHorizons.Builder.Props // Fix anglerfish speed on orbiting planets else if (component is AnglerfishController angler) { + if (planetGO?.GetComponent() is NHAstroObject nhao && !nhao.invulnerableToSun) + { + // Has a fluid detector, will go gorp (#830) + NHLogger.LogWarning("Having an anglerfish on a planet that has a fluid detector can lead to things breaking!"); + } + try { angler._chaseSpeed += OWPhysics.CalculateOrbitVelocity(planetGO.GetAttachedOWRigidbody(), planetGO.GetComponent().GetPrimaryBody().GetAttachedOWRigidbody()).magnitude; From ff10ecc9ac81b0e6276054cbd3e7af43d3c14bab Mon Sep 17 00:00:00 2001 From: xen-42 Date: Thu, 3 Oct 2024 00:22:03 -0400 Subject: [PATCH 15/17] Document keepLoaded more idk #829 --- NewHorizons/External/Modules/Props/DetailInfo.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NewHorizons/External/Modules/Props/DetailInfo.cs b/NewHorizons/External/Modules/Props/DetailInfo.cs index 171f1b64..9cc8feb0 100644 --- a/NewHorizons/External/Modules/Props/DetailInfo.cs +++ b/NewHorizons/External/Modules/Props/DetailInfo.cs @@ -56,6 +56,7 @@ namespace NewHorizons.External.Modules.Props /// /// Should this detail stay loaded (visible and collideable) even if you're outside the sector (good for very large props)? /// Also makes this detail visible on the map. + /// Keeping many props loaded is bad for performance so use this only when it's actually relevant /// Most logic/behavior scripts will still only work inside the sector, as most of those scripts break if a sector is not provided. /// public bool keepLoaded; From 85e25125afe94af0641dfef44bb6f2e0fb132ee5 Mon Sep 17 00:00:00 2001 From: Ben C Date: Thu, 3 Oct 2024 04:23:10 +0000 Subject: [PATCH 16/17] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 8cd8e1e7..186bd631 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -1368,7 +1368,7 @@ }, "keepLoaded": { "type": "boolean", - "description": "Should this detail stay loaded (visible and collideable) even if you're outside the sector (good for very large props)?\nAlso makes this detail visible on the map.\nMost logic/behavior scripts will still only work inside the sector, as most of those scripts break if a sector is not provided." + "description": "Should this detail stay loaded (visible and collideable) even if you're outside the sector (good for very large props)?\nAlso makes this detail visible on the map.\nKeeping many props loaded is bad for performance so use this only when it's actually relevant\nMost logic/behavior scripts will still only work inside the sector, as most of those scripts break if a sector is not provided." }, "hasPhysics": { "type": "boolean", From 36cb02886428370354d13f86c722d9f8126b9f69 Mon Sep 17 00:00:00 2001 From: xen-42 Date: Thu, 3 Oct 2024 00:23:43 -0400 Subject: [PATCH 17/17] clay gone forever :( --- NewHorizons/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/manifest.json b/NewHorizons/manifest.json index c75a3c1f..2e993213 100644 --- a/NewHorizons/manifest.json +++ b/NewHorizons/manifest.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/amazingalek/owml/master/schemas/manifest_schema.json", "filename": "NewHorizons.dll", - "author": "xen, Bwc9876, JohnCorby, MegaPiggy, Clay, Trifid, and friends", + "author": "xen, Bwc9876, JohnCorby, MegaPiggy, Trifid, and friends", "name": "New Horizons", "uniqueName": "xen.NewHorizons", "version": "1.22.7",