diff --git a/NewHorizons/Builder/Body/StarBuilder.cs b/NewHorizons/Builder/Body/StarBuilder.cs index 9a11ede9..3b5abd0d 100644 --- a/NewHorizons/Builder/Body/StarBuilder.cs +++ b/NewHorizons/Builder/Body/StarBuilder.cs @@ -32,6 +32,7 @@ namespace NewHorizons.Builder.Body private static GameObject _supernovaPrefab; private static Material _mainSequenceMaterial; private static Material _giantMaterial; + private static Material _flareMaterial; private static bool _isInit; @@ -54,6 +55,11 @@ namespace NewHorizons.Builder.Body if (_supernovaPrefab == null) _supernovaPrefab = SearchUtilities.Find("Sun_Body/Sector_SUN/Effects_SUN/Supernova").InstantiateInactive().Rename("Prefab_Supernova").DontDestroyOnLoad(); if (_mainSequenceMaterial == null) _mainSequenceMaterial = new Material(SearchUtilities.Find("Sun_Body").GetComponent()._startSurfaceMaterial).DontDestroyOnLoad(); if (_giantMaterial == null) _giantMaterial = new Material(SearchUtilities.Find("Sun_Body").GetComponent()._endSurfaceMaterial).DontDestroyOnLoad(); + if (_flareMaterial == null) + { + _flareMaterial = new Material(_starSolarFlareEmitter.GetComponentInChildren().GetComponent().sharedMaterial).DontDestroyOnLoad(); + _flareMaterial.color = Color.white; + } } public static (GameObject, StarController, StarEvolutionController, Light) Make(GameObject planetGO, Sector sector, StarModule starModule, IModBehaviour mod, bool isStellarRemnant) @@ -347,11 +353,11 @@ namespace NewHorizons.Builder.Body var flareTint = starModule.tint.ToColor(); var emitter = solarFlareEmitter.GetComponent(); emitter.tint = flareTint; + var material = new Material(_flareMaterial); foreach (var controller in solarFlareEmitter.GetComponentsInChildren()) { - // It multiplies color by tint but wants something very bright idk - controller._color = new Color(1, 1, 1); - controller.GetComponent().sharedMaterial.SetColor("_Color", controller._color); + controller.GetComponent().sharedMaterial = material; + controller._color = Color.white; controller._tint = flareTint; } } diff --git a/NewHorizons/External/SerializableEnums/NHFluidType.cs b/NewHorizons/External/SerializableEnums/NHFluidType.cs index f7b406f9..cc4f498c 100644 --- a/NewHorizons/External/SerializableEnums/NHFluidType.cs +++ b/NewHorizons/External/SerializableEnums/NHFluidType.cs @@ -7,14 +7,14 @@ namespace NewHorizons.External.SerializableEnums [JsonConverter(typeof(StringEnumConverter))] public enum NHFluidType { - [EnumMember(Value = @"none")] NONE = 0, - - [EnumMember(Value = @"water")] WATER = 1, - - [EnumMember(Value = @"cloud")] CLOUD = 2, - - [EnumMember(Value = @"sand")] SAND = 3, - - [EnumMember(Value = @"plasma")] PLASMA = 4 + [EnumMember(Value = @"none")] NONE, + [EnumMember(Value = @"air")] AIR, + [EnumMember(Value = @"water")] WATER, + [EnumMember(Value = @"tractorBeam")] TRACTOR_BEAM, + [EnumMember(Value = @"cloud")] CLOUD, + [EnumMember(Value = @"sand")] SAND, + [EnumMember(Value = @"plasma")] PLASMA, + [EnumMember(Value = @"fog")] FOG, + [EnumMember(Value = @"geyser")] GEYSER } } diff --git a/NewHorizons/NewHorizons.csproj b/NewHorizons/NewHorizons.csproj index 20cd9427..722d08c8 100644 --- a/NewHorizons/NewHorizons.csproj +++ b/NewHorizons/NewHorizons.csproj @@ -16,7 +16,7 @@ - + diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 896451a8..a45b559d 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -485,17 +485,25 @@ "description": "", "x-enumNames": [ "NONE", + "AIR", "WATER", + "TRACTOR_BEAM", "CLOUD", "SAND", - "PLASMA" + "PLASMA", + "FOG", + "GEYSER" ], "enum": [ "none", + "air", "water", + "tractorBeam", "cloud", "sand", - "plasma" + "plasma", + "fog", + "geyser" ] }, "MGradient": { diff --git a/NewHorizons/manifest.json b/NewHorizons/manifest.json index 3154f875..5499f8d1 100644 --- a/NewHorizons/manifest.json +++ b/NewHorizons/manifest.json @@ -4,7 +4,7 @@ "author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book", "name": "New Horizons", "uniqueName": "xen.NewHorizons", - "version": "1.11.1", + "version": "1.11.2", "owmlVersion": "2.9.0", "dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ], "conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ], diff --git a/SchemaExporter/SchemaExporter.csproj b/SchemaExporter/SchemaExporter.csproj index 9f0d56c9..0c08c270 100644 --- a/SchemaExporter/SchemaExporter.csproj +++ b/SchemaExporter/SchemaExporter.csproj @@ -18,9 +18,9 @@ PreserveNewest - - - + + +