Stop dev tools from deleting extras

This commit is contained in:
Noah Pilarski 2022-08-30 03:13:45 -04:00
parent 11dc7551d8
commit 11b3381ac2
3 changed files with 12 additions and 2 deletions

View File

@ -169,6 +169,11 @@ namespace NewHorizons.External.Configs
/// </summary> /// </summary>
public WaterModule Water; public WaterModule Water;
/// <summary>
/// Extra data that may be used by extension mods
/// </summary>
public object extras;
public PlanetConfig() public PlanetConfig()
{ {
// Always have to have a base module // Always have to have a base module

View File

@ -102,6 +102,11 @@ namespace NewHorizons.External.Configs
/// </summary> /// </summary>
public CuriosityColorInfo[] curiosities; public CuriosityColorInfo[] curiosities;
/// <summary>
/// Extra data that may be used by extension mods
/// </summary>
public object extras;
public class NomaiCoordinates public class NomaiCoordinates
{ {
[MinLength(2)] [MinLength(2)]

View File

@ -92,7 +92,7 @@ public static class SchemaExporter
if (_title is "Star System Schema" or "Celestial Body Schema") if (_title is "Star System Schema" or "Celestial Body Schema")
{ {
schema.Properties.Add("extras", new JsonSchemaProperty { schema.Properties["extras"] = new JsonSchemaProperty {
Type = JsonObjectType.Object, Type = JsonObjectType.Object,
Description = "Extra data that may be used by extension mods", Description = "Extra data that may be used by extension mods",
AllowAdditionalProperties = true, AllowAdditionalProperties = true,
@ -100,7 +100,7 @@ public static class SchemaExporter
{ {
Type = JsonObjectType.Object Type = JsonObjectType.Object
} }
}); };
} }
return schema; return schema;