public static void MaybeUpdateLightsToPeriod(bool forceUpdate = false) { if (lightsInit && timeInit && weatherInit && config.ready) { //Generate lightsets for emitters based on time, weather and transition progress LightSet lightSet = config.GetCurrentLightSet(); if (lightSet != null) { currentLightSet = lightSet; foreach (var light in lightList) { LightOrientation set = lightSet.orientations[light.orientation]; if (set != null) { light.SetLightParams(set, forceUpdate); } else { //MelonLoader.MelonLogger.Log("[AL] No set matches orientation."); ALUtils.Log("ERROR: No set matches orientation.", false, true); } } } else { //MelonLoader.MelonLogger.Log("[AL] No lightset defined"); ALUtils.Log("ERROR: No lightset defined.", false, true); } } }
public static void LoadConfigs() { currentScene = GameManager.m_ActiveScene; //Debug.Log("[ambient-lights] Loaded Scene: " + currentScene); ALUtils.Log("Loading Scene: " + currentScene, false, true); if (currentScene != "MainMenu") { config = new LightConfig(); config.Load(); if (config.ready) { currentLightSet = config.GetCurrentLightSet(); } SetupLights(); } }