Example #1
0
        public static void ResetAmbientLights(bool first_pass = true)
        {
            Debug.Log("[ambient-lights] Light data cleared.");

            light_list.Clear();

            config = null;
            global_periods_config = null;
            periods_data          = null;

            light_setup_done = false;

            period_transition = new AmbientPeriodTransition();

            current_scene   = null;
            current_period  = null;
            current_weather = null;

            light_override = false;

            if (first_pass)
            {
                scene_time_init    = false;
                scene_weather_init = false;
                AuroraLightsControl.InitAuroraLights();
            }
        }
Example #2
0
        public static void RegisterLights()
        {
            current_scene = GameManager.m_ActiveScene;

            Debug.Log("[ambient-lights] Loaded Scene: " + current_scene);

            if (current_scene != "MainMenu")
            {
                GetGlobalConfig();

                string scene_file = "scene_" + current_scene + ".json";

                if (File.Exists(Path.Combine(AmbientLightControl.mod_data_folder, scene_file)))
                {
                    config = Utils.DeserializeObject <AmbientLocationConfig>(File.ReadAllText(Path.Combine(AmbientLightControl.mod_data_folder, scene_file)));

                    MergeConfigs();
                }
                else
                {
                    Debug.Log("[ambient-lights] No lighting data for scene " + current_scene + " found. Using game default.");
                }
            }
        }