diff --git a/NewHorizons/External/Configs/IPlanetConfig.cs b/NewHorizons/External/Configs/IPlanetConfig.cs index 4b1a157a..3630396d 100644 --- a/NewHorizons/External/Configs/IPlanetConfig.cs +++ b/NewHorizons/External/Configs/IPlanetConfig.cs @@ -10,6 +10,7 @@ namespace NewHorizons.External.Configs bool Destroy { get; } string[] ChildrenToDestroy { get; } int BuildPriority { get; } + bool CanShowOnTitle { get; } BaseModule Base { get; } AtmosphereModule Atmosphere { get; } OrbitModule Orbit { get; } diff --git a/NewHorizons/External/Configs/PlanetConfig.cs b/NewHorizons/External/Configs/PlanetConfig.cs index f4708f35..8aa9b6b4 100644 --- a/NewHorizons/External/Configs/PlanetConfig.cs +++ b/NewHorizons/External/Configs/PlanetConfig.cs @@ -13,6 +13,7 @@ namespace NewHorizons.External.Configs public bool Destroy { get; set; } public string[] ChildrenToDestroy { get; set; } public int BuildPriority { get; set; } = -1; + public bool CanShowOnTitle { get; set; } = true; public BaseModule Base { get; set; } public AtmosphereModule Atmosphere { get; set; } public OrbitModule Orbit { get; set; } diff --git a/NewHorizons/Handlers/TitleSceneHandler.cs b/NewHorizons/Handlers/TitleSceneHandler.cs index f5428566..89a0ad2c 100644 --- a/NewHorizons/Handlers/TitleSceneHandler.cs +++ b/NewHorizons/Handlers/TitleSceneHandler.cs @@ -18,7 +18,7 @@ namespace NewHorizons.Handlers { //Try loading one planet why not //var eligible = BodyDict.Values.ToList().SelectMany(x => x).ToList().Where(b => (b.Config.HeightMap != null || b.Config.Atmosphere?.Cloud != null) && b.Config.Star == null).ToArray(); - var eligible = bodies.Where(b => (b.Config.HeightMap != null || b.Config.Atmosphere?.Cloud != null) && b.Config.Star == null).ToArray(); + var eligible = bodies.Where(b => (b.Config.HeightMap != null || b.Config.Atmosphere?.Cloud != null) && b.Config.Star == null && b.Config.CanShowOnTitle).ToArray(); var eligibleCount = eligible.Count(); if (eligibleCount == 0) return; diff --git a/NewHorizons/schema.json b/NewHorizons/schema.json index ce28457d..99d8aebc 100644 --- a/NewHorizons/schema.json +++ b/NewHorizons/schema.json @@ -145,6 +145,11 @@ "description": "A list of paths to child GameObjects to destroy on this planet", "default": [] }, + "canShowOnTitle": { + "type": "boolean", + "description": "Should this planet ever be shown on the title screen", + "default": "true" + } "Base": { "type": "object", "additionalProperties": false,