mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add option to enable/disable showing body on title screen
This commit is contained in:
parent
2e7fa09734
commit
bdb6fb40ab
@ -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; }
|
||||
|
||||
1
NewHorizons/External/Configs/PlanetConfig.cs
vendored
1
NewHorizons/External/Configs/PlanetConfig.cs
vendored
@ -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; }
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user