mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Revert "Add a prefab for ambient light too"
Doesn't work so might as well not use it
This commit is contained in:
parent
239eb55613
commit
dfc7798cd7
@ -4,18 +4,12 @@ namespace NewHorizons.Builder.General
|
|||||||
{
|
{
|
||||||
public static class AmbientLightBuilder
|
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)
|
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.transform.position = planetGO.transform.position;
|
||||||
lightGO.name = "AmbientLight";
|
lightGO.name = "AmbientLight";
|
||||||
|
|
||||||
|
|||||||
@ -268,7 +268,6 @@ namespace NewHorizons
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
AmbientLightBuilder.InitPrefab();
|
|
||||||
AtmosphereBuilder.InitPrefabs();
|
AtmosphereBuilder.InitPrefabs();
|
||||||
BrambleDimensionBuilder.InitPrefabs();
|
BrambleDimensionBuilder.InitPrefabs();
|
||||||
BrambleNodeBuilder.InitPrefabs();
|
BrambleNodeBuilder.InitPrefabs();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user