Added fluid type to clouds to customize splashes

This commit is contained in:
Nick 2022-05-05 03:15:53 -04:00
parent 2460bbafb7
commit 176d9e3011
3 changed files with 28 additions and 1 deletions

View File

@ -138,7 +138,21 @@ namespace NewHorizons.Builder.Atmosphere
fluidCLFV._layer = 5; fluidCLFV._layer = 5;
fluidCLFV._priority = 1; fluidCLFV._priority = 1;
fluidCLFV._density = 1.2f; 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._allowShipAutoroll = true;
fluidCLFV._disableOnStart = false; fluidCLFV._disableOnStart = false;

View File

@ -14,6 +14,7 @@ namespace NewHorizons.External
public string Cloud { get; set; } public string Cloud { get; set; }
public string CloudCap { get; set; } public string CloudCap { get; set; }
public string CloudRamp { get; set; } public string CloudRamp { get; set; }
public string CloudFluidType { get; set; }
public bool UseBasicCloudShader { get; set; } public bool UseBasicCloudShader { get; set; }
public bool ShadowsOnClouds { get; set; } = true; public bool ShadowsOnClouds { get; set; } = true;
public MColor FogTint { get; set; } public MColor FogTint { get; set; }

View File

@ -254,6 +254,18 @@
"type": "string", "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." "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": { "useBasicCloudShader": {
"type": "boolean", "type": "boolean",
"default": false, "default": false,