Revert "Add a prefab for ambient light too"

Doesn't work so might as well not use it
This commit is contained in:
Noah Pilarski 2022-10-08 16:24:21 -04:00
parent 239eb55613
commit dfc7798cd7
2 changed files with 3 additions and 10 deletions

View File

@ -4,18 +4,12 @@ namespace NewHorizons.Builder.General
{
public static class AmbientLightBuilder
{
private static GameObject _ambientLightPrefab;
internal static void InitPrefab()
{
if (_ambientLightPrefab == null) _ambientLightPrefab = SearchUtilities.Find("QuantumMoon_Body/AmbientLight_QM").InstantiateInactive().Rename("Prefab_QM_AmbientLight").DontDestroyOnLoad();
}
public static Light Make(GameObject planetGO, Sector sector, float scale, float intensity)
{
InitPrefab();
var ambientLight = Main.Instance.CurrentStarSystem == "EyeOfTheUniverse" ? SearchUtilities.Find("EyeOfTheUniverse_Body/Sector_EyeOfTheUniverse/SixthPlanet_Root/QuantumMoonProxy_Pivot/QuantumMoonProxy_Root/MoonState_Root/AmbientLight_QM") : SearchUtilities.Find("QuantumMoon_Body/AmbientLight_QM");
if (ambientLight == null) return null;
GameObject lightGO = GameObject.Instantiate(_ambientLightPrefab, sector?.transform ?? planetGO.transform);
GameObject lightGO = GameObject.Instantiate(ambientLight, sector?.transform ?? planetGO.transform);
lightGO.transform.position = planetGO.transform.position;
lightGO.name = "AmbientLight";

View File

@ -268,7 +268,6 @@ namespace NewHorizons
{
try
{
AmbientLightBuilder.InitPrefab();
AtmosphereBuilder.InitPrefabs();
BrambleDimensionBuilder.InitPrefabs();
BrambleNodeBuilder.InitPrefabs();