mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
remove old broken skybox thing
This commit is contained in:
parent
ba505cd7c0
commit
ee4a96cb84
@ -11,18 +11,6 @@ namespace NewHorizons.Builder.StarSystem
|
|||||||
private static readonly int _skyboxLayer = LayerMask.NameToLayer("Skybox");
|
private static readonly int _skyboxLayer = LayerMask.NameToLayer("Skybox");
|
||||||
private static readonly Shader _unlitShader = Shader.Find("Unlit/Texture");
|
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)
|
public static void Make(StarSystemConfig.SkyboxModule module, IModBehaviour mod)
|
||||||
{
|
{
|
||||||
Logger.Log("Building Skybox");
|
Logger.Log("Building Skybox");
|
||||||
|
|||||||
40
NewHorizons/External/Configs/StarSystemConfig.cs
vendored
40
NewHorizons/External/Configs/StarSystemConfig.cs
vendored
@ -40,14 +40,6 @@ namespace NewHorizons.External.Configs
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool mapRestricted;
|
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>
|
/// <summary>
|
||||||
/// Customize the skybox for this system
|
/// Customize the skybox for this system
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -120,27 +112,6 @@ namespace NewHorizons.External.Configs
|
|||||||
public int[] z;
|
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]
|
[JsonObject]
|
||||||
public class SkyboxModule
|
public class SkyboxModule
|
||||||
{
|
{
|
||||||
@ -241,9 +212,6 @@ namespace NewHorizons.External.Configs
|
|||||||
|
|
||||||
// If current one is null take the other
|
// If current one is null take the other
|
||||||
factRequiredForWarp = string.IsNullOrEmpty(factRequiredForWarp) ? otherConfig.factRequiredForWarp : factRequiredForWarp;
|
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;
|
Skybox = Skybox == null ? otherConfig.Skybox : Skybox;
|
||||||
travelAudio = string.IsNullOrEmpty(travelAudio) ? otherConfig.travelAudio : travelAudio;
|
travelAudio = string.IsNullOrEmpty(travelAudio) ? otherConfig.travelAudio : travelAudio;
|
||||||
|
|
||||||
@ -271,14 +239,6 @@ namespace NewHorizons.External.Configs
|
|||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
if (!string.IsNullOrEmpty(travelAudioClip)) travelAudio = travelAudioClip;
|
if (!string.IsNullOrEmpty(travelAudioClip)) travelAudio = travelAudioClip;
|
||||||
if (!string.IsNullOrEmpty(travelAudioFilePath)) travelAudio = travelAudioFilePath;
|
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 (coords != null || vesselPosition != null || vesselRotation != null || warpExitPosition != null || warpExitRotation != null)
|
||||||
{
|
{
|
||||||
if (Vessel == null)
|
if (Vessel == null)
|
||||||
|
|||||||
@ -27,13 +27,6 @@ namespace NewHorizons.Handlers
|
|||||||
SkyboxBuilder.Make(system.Config.Skybox, system.Mod);
|
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)
|
if (system.Config.enableTimeLoop)
|
||||||
{
|
{
|
||||||
var timeLoopController = new GameObject("TimeLoopController");
|
var timeLoopController = new GameObject("TimeLoopController");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user