diff --git a/NewHorizons/Builder/StarSystem/SkyboxBuilder.cs b/NewHorizons/Builder/StarSystem/SkyboxBuilder.cs index 5035f77c..8fb429ea 100644 --- a/NewHorizons/Builder/StarSystem/SkyboxBuilder.cs +++ b/NewHorizons/Builder/StarSystem/SkyboxBuilder.cs @@ -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(info.assetBundle, info.path, mod); - RenderSettings.skybox = skyBoxMaterial; - foreach (var camera in Resources.FindObjectsOfTypeAll()) - { - camera.clearFlags = CameraClearFlags.Skybox; - } - } - public static void Make(StarSystemConfig.SkyboxModule module, IModBehaviour mod) { Logger.Log("Building Skybox"); diff --git a/NewHorizons/External/Configs/StarSystemConfig.cs b/NewHorizons/External/Configs/StarSystemConfig.cs index 6701dd31..1e716d3c 100644 --- a/NewHorizons/External/Configs/StarSystemConfig.cs +++ b/NewHorizons/External/Configs/StarSystemConfig.cs @@ -40,14 +40,6 @@ namespace NewHorizons.External.Configs /// public bool mapRestricted; -#pragma warning disable CS0618 - /// - /// Customize the skybox for this system - /// - [Obsolete("skybox is deprecated, please use Skybox instead")] - public SkyboxConfig skybox; -#pragma warning restore CS0618 - /// /// Customize the skybox for this system /// @@ -120,27 +112,6 @@ namespace NewHorizons.External.Configs public int[] z; } - [Obsolete("SkyboxConfig is deprecated, please use SkyboxModule instead")] - [JsonObject] - public class SkyboxConfig - { - /// - /// Path to the Unity asset bundle to load the skybox material from - /// - public string assetBundle; - - /// - /// Whether to destroy the star field around the player - /// - public bool destroyStarField; - - /// - /// Path to the material within the asset bundle specified by `assetBundle` to use for the skybox - /// - 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) diff --git a/NewHorizons/Handlers/SystemCreationHandler.cs b/NewHorizons/Handlers/SystemCreationHandler.cs index 571502e8..52762c3a 100644 --- a/NewHorizons/Handlers/SystemCreationHandler.cs +++ b/NewHorizons/Handlers/SystemCreationHandler.cs @@ -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");