diff --git a/NewHorizons/Builder/General/AmbientLightBuilder.cs b/NewHorizons/Builder/General/AmbientLightBuilder.cs index 634051a0..2a1f326c 100644 --- a/NewHorizons/Builder/General/AmbientLightBuilder.cs +++ b/NewHorizons/Builder/General/AmbientLightBuilder.cs @@ -5,7 +5,7 @@ namespace NewHorizons.Builder.General { public static class AmbientLightBuilder { - public static Light Make(GameObject planetGO, Sector sector, AmbientLightModule config) + public static Light Make(GameObject planetGO, Sector sector, AmbientLightModule config, float surfaceSize) { 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; diff --git a/NewHorizons/Handlers/PlanetCreationHandler.cs b/NewHorizons/Handlers/PlanetCreationHandler.cs index 196061dc..e69411ee 100644 --- a/NewHorizons/Handlers/PlanetCreationHandler.cs +++ b/NewHorizons/Handlers/PlanetCreationHandler.cs @@ -498,9 +498,10 @@ namespace NewHorizons.Handlers var sphereOfInfluence = GetSphereOfInfluence(body); Light[] ambientLight = null; - if (body.Config.Base.ambientLight != 0) + if (body.Config.AmbientLights != null) { - ambientLight = AmbientLightBuilder.Make(go, sector, sphereOfInfluence, body.Config.Base.ambientLight); + ambientLight = new Light[0]; + foreach (var light in body.Config.AmbientLights) ambientLight.Append(AmbientLightBuilder.Make(go, sector, light, body.Config.Base.surfaceSize)).ToArray(); } if (body.Config.Base.groundSize != 0)