cherry picked commit that made useBasicShader obsolete

This commit is contained in:
FreezeDriedMangoes 2022-06-06 12:32:27 -04:00
parent 12700fc932
commit 51a6077180
3 changed files with 232 additions and 218 deletions

View File

@ -176,7 +176,7 @@ namespace NewHorizons.Builder.Atmosphere
Material[] prefabMaterials = atmo.clouds.cloudsPrefab == CloudPrefabType.GiantsDeep ? _gdCloudMaterials : _qmCloudMaterials;
var tempArray = new Material[2];
if (atmo.clouds.useBasicCloudShader)
if (atmo.clouds.cloudsPrefab == CloudPrefabType.Basic)
{
var material = new Material(_sphereShader);
if (atmo.clouds.unlit) material.renderQueue = 2550;

View File

@ -235,6 +235,10 @@ namespace NewHorizons.External.Configs
// Former is obsolete, latter is to validate
if (Atmosphere.hasAtmosphere || Atmosphere.atmosphereTint != null)
Atmosphere.useAtmosphereShader = true;
// useBasicCloudShader is obsolete
if (Atmosphere.clouds != null && Atmosphere.clouds.useBasicCloudShader)
Atmosphere.clouds.cloudsPrefab = CloudPrefabType.Basic;
}
if (Props?.tornados != null)

View File

@ -28,6 +28,8 @@ namespace NewHorizons.External.Modules
[EnumMember(Value = @"giantsDeep")] GiantsDeep = 0,
[EnumMember(Value = @"quantumMoon")] QuantumMoon = 1,
[EnumMember(Value = @"basic")] Basic = 2,
}
[JsonObject]
@ -152,10 +154,18 @@ namespace NewHorizons.External.Modules
/// </summary>
public bool unlit;
#region Obsolete
/// <summary>
/// Set to `false` in order to use Giant's Deep's shader. Set to `true` to just apply the cloud texture as is.
/// </summary>
[Obsolete("useBasicCloudShader is deprecated, please use cloudsPrefab=\"basic\" instead")]
public bool useBasicCloudShader;
#endregion Obsolete
}