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;