diff --git a/NewHorizons/External/Configs/PlanetConfig.cs b/NewHorizons/External/Configs/PlanetConfig.cs index 6ec7d24c..419b87b2 100644 --- a/NewHorizons/External/Configs/PlanetConfig.cs +++ b/NewHorizons/External/Configs/PlanetConfig.cs @@ -9,7 +9,7 @@ namespace NewHorizons.External.Configs public string Version { get; set; } public string StarSystem { get; set; } = "SolarSystem"; public bool Destroy { get; set; } - public string[] ChildrenToDestroy { get; set; } + public string[] RemoveChildren { get; set; } public int BuildPriority { get; set; } = -1; public bool CanShowOnTitle { get; set; } = true; public bool IsQuantumState { get; set; } @@ -32,6 +32,10 @@ namespace NewHorizons.External.Configs public SandModule Sand { get; set; } public FunnelModule Funnel { get; set; } + // Obsolete + public string[] ChildrenToDestroy { get; set; } + + public PlanetConfig() { // Always have to have a base module @@ -57,17 +61,22 @@ namespace NewHorizons.External.Configs Lava.Size = Base.LavaSize; } - if(Base.BlackHoleSize != 0) + if (Base.BlackHoleSize != 0) { Singularity = new SingularityModule(); Singularity.Type = "BlackHole"; Singularity.Size = Base.BlackHoleSize; } - if(Base.IsSatellite) + if (Base.IsSatellite) { Base.ShowMinimap = false; } + + if (ChildrenToDestroy != null) + { + RemoveChildren = ChildrenToDestroy; + } } } } diff --git a/NewHorizons/Handlers/PlanetCreationHandler.cs b/NewHorizons/Handlers/PlanetCreationHandler.cs index becd1584..d7d5f15a 100644 --- a/NewHorizons/Handlers/PlanetCreationHandler.cs +++ b/NewHorizons/Handlers/PlanetCreationHandler.cs @@ -248,9 +248,9 @@ namespace NewHorizons.Handlers UpdateBodyOrbit(body, go); } - if (body.Config.ChildrenToDestroy != null && body.Config.ChildrenToDestroy.Length > 0) + if (body.Config.RemoveChildren != null && body.Config.RemoveChildren.Length > 0) { - foreach (var child in body.Config.ChildrenToDestroy) + foreach (var child in body.Config.RemoveChildren) { Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => GameObject.Find(go.name + "/" + child)?.SetActive(false), 2); } diff --git a/NewHorizons/dialogue_schema.xsd b/NewHorizons/Schemas/dialogue_schema.xsd similarity index 100% rename from NewHorizons/dialogue_schema.xsd rename to NewHorizons/Schemas/dialogue_schema.xsd diff --git a/NewHorizons/schema.json b/NewHorizons/Schemas/schema.json similarity index 99% rename from NewHorizons/schema.json rename to NewHorizons/Schemas/schema.json index 6ba03179..7dcea4f0 100644 --- a/NewHorizons/schema.json +++ b/NewHorizons/Schemas/schema.json @@ -182,7 +182,7 @@ "description": "`true` if you want to delete this planet", "default": false }, - "childrenToDestroy": { + "removeChildren": { "type": "array", "description": "A list of paths to child GameObjects to destroy on this planet", "items": { @@ -262,7 +262,7 @@ "default": false, "description": "Set this to true if you are replacing the sun with a different body. Only one object in a star system should ever have this set to true." }, - "showMiniMap": { + "showMinimap": { "type": "boolean", "default": true, "description": "Do we show the minimap when walking around this planet?" diff --git a/NewHorizons/shiplog_schema.xsd b/NewHorizons/Schemas/shiplog_schema.xsd similarity index 100% rename from NewHorizons/shiplog_schema.xsd rename to NewHorizons/Schemas/shiplog_schema.xsd diff --git a/NewHorizons/star_system_schema.json b/NewHorizons/Schemas/star_system_schema.json similarity index 100% rename from NewHorizons/star_system_schema.json rename to NewHorizons/Schemas/star_system_schema.json diff --git a/NewHorizons/text_schema.xsd b/NewHorizons/Schemas/text_schema.xsd similarity index 100% rename from NewHorizons/text_schema.xsd rename to NewHorizons/Schemas/text_schema.xsd diff --git a/NewHorizons/translation_schema.json b/NewHorizons/Schemas/translation_schema.json similarity index 100% rename from NewHorizons/translation_schema.json rename to NewHorizons/Schemas/translation_schema.json