remove old broken skybox thing

This commit is contained in:
JohnCorby 2022-07-23 18:01:35 -07:00
parent ba505cd7c0
commit ee4a96cb84
3 changed files with 0 additions and 59 deletions

View File

@ -11,18 +11,6 @@ namespace NewHorizons.Builder.StarSystem
private static readonly int _skyboxLayer = LayerMask.NameToLayer("Skybox");
private static readonly Shader _unlitShader = Shader.Find("Unlit/Texture");
[Obsolete]
public static void Make(StarSystemConfig.SkyboxConfig info, IModBehaviour mod)
{
Logger.Log("Building Skybox");
var skyBoxMaterial = AssetBundleUtilities.Load<Material>(info.assetBundle, info.path, mod);
RenderSettings.skybox = skyBoxMaterial;
foreach (var camera in Resources.FindObjectsOfTypeAll<OWCamera>())
{
camera.clearFlags = CameraClearFlags.Skybox;
}
}
public static void Make(StarSystemConfig.SkyboxModule module, IModBehaviour mod)
{
Logger.Log("Building Skybox");

View File

@ -40,14 +40,6 @@ namespace NewHorizons.External.Configs
/// </summary>
public bool mapRestricted;
#pragma warning disable CS0618
/// <summary>
/// Customize the skybox for this system
/// </summary>
[Obsolete("skybox is deprecated, please use Skybox instead")]
public SkyboxConfig skybox;
#pragma warning restore CS0618
/// <summary>
/// Customize the skybox for this system
/// </summary>
@ -120,27 +112,6 @@ namespace NewHorizons.External.Configs
public int[] z;
}
[Obsolete("SkyboxConfig is deprecated, please use SkyboxModule instead")]
[JsonObject]
public class SkyboxConfig
{
/// <summary>
/// Path to the Unity asset bundle to load the skybox material from
/// </summary>
public string assetBundle;
/// <summary>
/// Whether to destroy the star field around the player
/// </summary>
public bool destroyStarField;
/// <summary>
/// Path to the material within the asset bundle specified by `assetBundle` to use for the skybox
/// </summary>
public string path;
}
[JsonObject]
public class SkyboxModule
{
@ -241,9 +212,6 @@ namespace NewHorizons.External.Configs
// If current one is null take the other
factRequiredForWarp = string.IsNullOrEmpty(factRequiredForWarp) ? otherConfig.factRequiredForWarp : factRequiredForWarp;
#pragma warning disable CS0618 // Type or member is obsolete
skybox = skybox == null ? otherConfig.skybox : skybox;
#pragma warning restore CS0618 // Type or member is obsolete
Skybox = Skybox == null ? otherConfig.Skybox : Skybox;
travelAudio = string.IsNullOrEmpty(travelAudio) ? otherConfig.travelAudio : travelAudio;
@ -271,14 +239,6 @@ namespace NewHorizons.External.Configs
#pragma warning disable 612, 618
if (!string.IsNullOrEmpty(travelAudioClip)) travelAudio = travelAudioClip;
if (!string.IsNullOrEmpty(travelAudioFilePath)) travelAudio = travelAudioFilePath;
if (skybox != null)
{
if (Skybox == null)
{
Skybox = new SkyboxModule();
Skybox.destroyStarField = skybox.destroyStarField;
}
}
if (coords != null || vesselPosition != null || vesselRotation != null || warpExitPosition != null || warpExitRotation != null)
{
if (Vessel == null)

View File

@ -27,13 +27,6 @@ namespace NewHorizons.Handlers
SkyboxBuilder.Make(system.Config.Skybox, system.Mod);
}
#pragma warning disable CS0618, CS0612 // Type or member is obsolete
if (system.Config.skybox?.assetBundle != null && system.Config.skybox?.path != null)
{
SkyboxBuilder.Make(system.Config.skybox, system.Mod);
}
#pragma warning restore CS0618, CS0612 // Type or member is obsolete
if (system.Config.enableTimeLoop)
{
var timeLoopController = new GameObject("TimeLoopController");