new-horizons/NewHorizons/Handlers/SystemCreationHandler.cs
Ben C e19e486f9d
0.13.1 (#102)
* Update PropModule.cs

* Debugging FluidDetector AddVolume

* Catch exceptions if they don't have the DLC

* Update PropBuildManager.cs

* Added the ability to make custom sky boxes

* Move config reset to `ResetConfigs` in Main.cs

* Bump version

Co-authored-by: Nick <nicholasconnors@hotmail.ca>
2022-05-06 19:46:21 -07:00

36 lines
890 B
C#

using NewHorizons.External.Configs;
using NewHorizons.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NewHorizons.Builder.StarSystem;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
using Object = UnityEngine.Object;
namespace NewHorizons.Handlers
{
public static class SystemCreationHandler
{
public static void LoadSystem(NewHorizonsSystem system)
{
var skybox = GameObject.Find("Skybox/Starfield");
if (system.Config.skybox?.destroyStarField ?? false)
{
Object.Destroy(skybox);
}
if (system.Config.skybox?.assetBundle != null && system.Config.skybox?.path != null)
{
SkyboxBuilder.Make(system.Config.skybox, system.Mod);
}
}
}
}