mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Make CloudFluidType not nullable anymore
This commit is contained in:
parent
f1585c215a
commit
1d6a43c4fe
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
@ -39,7 +39,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-dotnet@v1
|
||||
|
||||
# Disabe Strong Name Verification to let us pull a switch-a-roo
|
||||
# Disable Strong Name Verification to let us pull a switch-a-roo
|
||||
- run: "C:\\\"Program Files (x86)\"\\\"Microsoft SDKs\"\\Windows\\v10.0A\\bin\\\"NETFX 4.8 Tools\"\\x64\\sn.exe -Vr *"
|
||||
|
||||
- name: Build Project
|
||||
|
||||
@ -81,16 +81,14 @@ namespace NewHorizons.Builder.Atmosphere
|
||||
fluidCLFV._density = 1.2f;
|
||||
|
||||
var fluidType = FluidVolume.Type.CLOUD;
|
||||
if (atmo.clouds.fluidType != null)
|
||||
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
fluidType = (FluidVolume.Type)Enum.Parse(typeof(FluidVolume.Type), Enum.GetName(typeof(CloudFluidType), atmo.clouds.fluidType).ToUpper());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError($"Couldn't parse fluid volume type [{atmo.clouds.fluidType}]: {ex.Message}, {ex.StackTrace}");
|
||||
}
|
||||
fluidType = (FluidVolume.Type)Enum.Parse(typeof(FluidVolume.Type), Enum.GetName(typeof(CloudFluidType), atmo.clouds.fluidType).ToUpper());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError($"Couldn't parse fluid volume type [{atmo.clouds.fluidType}]: {ex.Message}, {ex.StackTrace}");
|
||||
}
|
||||
|
||||
fluidCLFV._fluidType = fluidType;
|
||||
|
||||
@ -48,16 +48,13 @@ namespace NewHorizons.Builder.Body
|
||||
var sfv = ringVolume.AddComponent<SimpleFluidVolume>();
|
||||
var fluidType = FluidVolume.Type.NONE;
|
||||
|
||||
if (ring.fluidType != null)
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
fluidType = (FluidVolume.Type)Enum.Parse(typeof(FluidVolume.Type), Enum.GetName(typeof(CloudFluidType), ring.fluidType).ToUpper());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError($"Couldn't parse fluid volume type [{ring.fluidType}]: {ex.Message}, {ex.StackTrace}");
|
||||
}
|
||||
fluidType = (FluidVolume.Type)Enum.Parse(typeof(FluidVolume.Type), Enum.GetName(typeof(CloudFluidType), ring.fluidType).ToUpper());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError($"Couldn't parse fluid volume type [{ring.fluidType}]: {ex.Message}, {ex.StackTrace}");
|
||||
}
|
||||
|
||||
sfv._fluidType = fluidType;
|
||||
|
||||
@ -95,7 +95,7 @@ namespace NewHorizons.External.Modules
|
||||
/// Fluid type for sounds/effects when colliding with this cloud.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public CloudFluidType? fluidType = CloudFluidType.Cloud;
|
||||
public CloudFluidType fluidType = CloudFluidType.Cloud;
|
||||
|
||||
/// <summary>
|
||||
/// Add lightning to this planet like on Giant's Deep.
|
||||
|
||||
@ -9,7 +9,7 @@ namespace NewHorizons.External.Modules.VariableSize
|
||||
/// <summary>
|
||||
/// Fluid type for sounds/effects when colliding with this ring.
|
||||
/// </summary>
|
||||
public CloudFluidType? fluidType = CloudFluidType.None;
|
||||
public CloudFluidType fluidType = CloudFluidType.None;
|
||||
|
||||
/// <summary>
|
||||
/// Angle between the rings and the equatorial plane of the planet.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user