diff --git a/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs b/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs index 895ccd31..48ab7d77 100644 --- a/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs +++ b/NewHorizons/Builder/Atmosphere/CloudsBuilder.cs @@ -138,7 +138,21 @@ namespace NewHorizons.Builder.Atmosphere fluidCLFV._layer = 5; fluidCLFV._priority = 1; fluidCLFV._density = 1.2f; - fluidCLFV._fluidType = FluidVolume.Type.CLOUD; + + var fluidType = FluidVolume.Type.CLOUD; + if (!string.IsNullOrEmpty(atmo.CloudFluidType)) + { + try + { + fluidType = (FluidVolume.Type)Enum.Parse(typeof(FluidVolume.Type), atmo.CloudFluidType.ToUpper()); + } + catch (Exception ex) + { + Logger.LogError($"Couldn't parse fluid volume type [{atmo.CloudFluidType}]: {ex.Message}, {ex.StackTrace}"); + } + } + + fluidCLFV._fluidType = fluidType; fluidCLFV._allowShipAutoroll = true; fluidCLFV._disableOnStart = false; diff --git a/NewHorizons/External/AtmosphereModule.cs b/NewHorizons/External/AtmosphereModule.cs index bc766718..88c54229 100644 --- a/NewHorizons/External/AtmosphereModule.cs +++ b/NewHorizons/External/AtmosphereModule.cs @@ -14,6 +14,7 @@ namespace NewHorizons.External public string Cloud { get; set; } public string CloudCap { get; set; } public string CloudRamp { get; set; } + public string CloudFluidType { get; set; } public bool UseBasicCloudShader { get; set; } public bool ShadowsOnClouds { get; set; } = true; public MColor FogTint { get; set; } diff --git a/NewHorizons/schema.json b/NewHorizons/schema.json index eaf6d622..2641380f 100644 --- a/NewHorizons/schema.json +++ b/NewHorizons/schema.json @@ -254,6 +254,18 @@ "type": "string", "description": "Relative filepath to the cloud ramp texture, if the planet has clouds. If you don't put anything here it will be auto-generated." }, + "cloudFluidType": { + "type": "string", + "default": "CLOUD", + "description": "Fluid type for sounds/effects when colliding with this cloud.", + "enum": [ + "NONE", + "WATER", + "CLOUD", + "SAND", + "PLASMA" + ] + }, "useBasicCloudShader": { "type": "boolean", "default": false,