From d7b7e3226c4a4f1f46cbdc45426d4cffcae1c9b0 Mon Sep 17 00:00:00 2001 From: FreezeDriedMangoes Date: Wed, 29 Jun 2022 12:26:03 -0400 Subject: [PATCH] added config definitions for bramble nodes and dimensions --- NewHorizons/External/Configs/PlanetConfig.cs | 5 ++ NewHorizons/External/Modules/BrambleModule.cs | 75 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 NewHorizons/External/Modules/BrambleModule.cs diff --git a/NewHorizons/External/Configs/PlanetConfig.cs b/NewHorizons/External/Configs/PlanetConfig.cs index 842ca7e3..da7ed43d 100644 --- a/NewHorizons/External/Configs/PlanetConfig.cs +++ b/NewHorizons/External/Configs/PlanetConfig.cs @@ -30,6 +30,11 @@ namespace NewHorizons.External.Configs /// public BaseModule Base; + /// + /// Add bramble nodes to this planet and/or make this planet a bramble dimension + /// + public BrambleModule Bramble; + /// /// Set to a higher number if you wish for this body to be built sooner /// diff --git a/NewHorizons/External/Modules/BrambleModule.cs b/NewHorizons/External/Modules/BrambleModule.cs new file mode 100644 index 00000000..405ce008 --- /dev/null +++ b/NewHorizons/External/Modules/BrambleModule.cs @@ -0,0 +1,75 @@ +using NewHorizons.Utility; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NewHorizons.External.Modules +{ + + [JsonObject] + public class BrambleModule + { + /// + /// Defining this value will make this body a bramble dimension. Leave it null to not do that. + /// + public BrambleDimensionInfo dimension; + + /// + /// Place nodes/seeds that take you to other bramble dimensions + /// + public BrambleNodeInfo[] nodes; + + + [JsonObject] + public class BrambleDimensionInfo + { + /// + /// Defines the inner radius of this dimension. Leave blank for the default of + /// + public float radius; + + /// + /// The color of the fog inside this dimension. Leave blank for the default yellowish color + /// + public MColor fogTint; + } + + + [JsonObject] + public class BrambleNodeInfo + { + /// + /// The physical position of the node + /// + public MVector3 position; + + /// + /// The physical rotation of the node + /// + public MVector3 rotation; + + /// + /// The name of the planet that hosts the dimension this node links to + /// + public string linksTo; + + /// + /// Set this to true to make this node a seed instead of a node the player can enter + /// + public bool seed; + + /// + /// The color of the fog inside the node. Leave blank for the default yellowish color + /// + public MColor fogTint; + + /// + /// The color of the shafts of light coming from the entrances to the node. Leave blank for the default yellowish color + /// + public MColor lightTint; + } + } +}