diff --git a/NewHorizons/Builder/Orbital/OrbitlineBuilder.cs b/NewHorizons/Builder/Orbital/OrbitlineBuilder.cs index 006b63c0..651eef5d 100644 --- a/NewHorizons/Builder/Orbital/OrbitlineBuilder.cs +++ b/NewHorizons/Builder/Orbital/OrbitlineBuilder.cs @@ -69,6 +69,7 @@ namespace NewHorizons.Builder.Orbital */ orbitLine._color = color; + orbitLine._lineRenderer.endColor = new Color(color.r, color.g, color.b, 0f); orbitLine._astroObject = astroObject; orbitLine._fade = fade; diff --git a/NewHorizons/Builder/Props/BrambleNodeBuilder.cs b/NewHorizons/Builder/Props/BrambleNodeBuilder.cs index cfab3e51..3dad6e7f 100644 --- a/NewHorizons/Builder/Props/BrambleNodeBuilder.cs +++ b/NewHorizons/Builder/Props/BrambleNodeBuilder.cs @@ -213,8 +213,8 @@ namespace NewHorizons.Builder.Props // change the colors // - if (config.isSeed) SetSeedColors(brambleNode, config.fogTint.ToColor(), config.lightTint.ToColor()); - else SetNodeColors(brambleNode, config.fogTint.ToColor(), config.lightTint.ToColor()); + if (config.isSeed) SetSeedColors(brambleNode, config.fogTint?.ToColor(), config.lightTint?.ToColor()); + else SetNodeColors(brambleNode, config.fogTint?.ToColor(), config.lightTint?.ToColor()); // // set up warps @@ -254,13 +254,13 @@ namespace NewHorizons.Builder.Props return brambleNode; } - public static void SetNodeColors(GameObject brambleNode, Color fogTint, Color lightTint) + public static void SetNodeColors(GameObject brambleNode, Color? fogTint, Color? lightTint) { if (fogTint != null) { var fogRenderer = brambleNode.GetComponent(); - fogRenderer._fogColor = fogTint; + fogRenderer._fogColor = fogTint.Value; fogRenderer._useFarFogColor = false; var fogBackdrop = brambleNode.FindChild("Terrain_DB_BrambleSphere_Inner_v2")?.FindChild("fogbackdrop_v2"); @@ -273,7 +273,7 @@ namespace NewHorizons.Builder.Props var lightShaft1 = lightShafts.FindChild("BrambleLightShaft1"); var mat = lightShaft1.GetComponent().material; - mat.color = lightTint; + mat.color = lightTint.Value; for (int i = 1; i <= 6; i++) { @@ -283,7 +283,7 @@ namespace NewHorizons.Builder.Props } } - public static void SetSeedColors(GameObject brambleSeed, Color fogTint, Color lightTint) + public static void SetSeedColors(GameObject brambleSeed, Color? fogTint, Color? lightTint) { if (fogTint != null) { @@ -291,7 +291,7 @@ namespace NewHorizons.Builder.Props var fogMeshRenderer = fogRenderer.GetComponent(); var mat = fogMeshRenderer.material; - mat.color = fogTint; + mat.color = fogTint.Value; fogMeshRenderer.sharedMaterial = mat; } @@ -301,7 +301,7 @@ namespace NewHorizons.Builder.Props var lightShaft1 = lightShafts.FindChild("DB_SeedLightShafts1"); var mat = lightShaft1.GetComponent().material; - mat.color = lightTint; + mat.color = lightTint.Value; for (int i = 1; i <= 6; i++) { diff --git a/NewHorizons/External/Configs/TranslationConfig.cs b/NewHorizons/External/Configs/TranslationConfig.cs index 2132ca88..6ca69d8f 100644 --- a/NewHorizons/External/Configs/TranslationConfig.cs +++ b/NewHorizons/External/Configs/TranslationConfig.cs @@ -30,7 +30,7 @@ namespace NewHorizons.External.Configs /// /// Translation table for achievements. The key is the unique ID of the achievement /// - private readonly Dictionary AchievementTranslations; + public Dictionary AchievementTranslations; [JsonObject] public class AchievementTranslationInfo @@ -38,12 +38,12 @@ namespace NewHorizons.External.Configs /// /// The name of the achievement. /// - private string Name; + public string Name; /// /// The short description for this achievement. /// - private readonly string Description; + public string Description; } #pragma warning restore 0169 #endregion diff --git a/NewHorizons/Schemas/translation_schema.json b/NewHorizons/Schemas/translation_schema.json index 02564aee..92a114ef 100644 --- a/NewHorizons/Schemas/translation_schema.json +++ b/NewHorizons/Schemas/translation_schema.json @@ -25,11 +25,34 @@ "type": "string" } }, + "AchievementTranslations": { + "type": "object", + "description": "Translation table for achievements. The key is the unique ID of the achievement", + "additionalProperties": { + "$ref": "#/definitions/AchievementTranslationInfo" + } + }, "$schema": { "type": "string", "description": "The schema to validate with" } }, + "definitions": { + "AchievementTranslationInfo": { + "type": "object", + "additionalProperties": false, + "properties": { + "Name": { + "type": "string", + "description": "The name of the achievement." + }, + "Description": { + "type": "string", + "description": "The short description for this achievement." + } + } + } + }, "$docs": { "title": "Translation Schema", "description": "Schema for a translation file in New Horizons"