Ejemplo n.º 1
0
        internal static void HandleHotkeys()
        {
            if ((InputManager.GetKeyDown(InputManager.m_CurrentContext, KeyCode.L) && !InputManager.GetSprintDown(InputManager.m_CurrentContext) && AmbientLights.debugVer) || (InputManager.GetKeyDown(InputManager.m_CurrentContext, KeyCode.L) && InputManager.GetSprintDown(InputManager.m_CurrentContext) && Settings.options.enableDebugKey && !AmbientLights.debugVer))
            {
                if (AmbientLights.lightOverride)
                {
                    AmbientLights.lightOverride = false;
                    AmbientLights.MaybeUpdateLightsToPeriod(true);

                    Log("Ambient Lights: On", true, false, true);

                    /*HUDMessage.AddMessage("Ambient Lights: On");
                     * if (AmbientLights.debugVer)
                     *  Debug.Log("Ambient Lights: On");*/
                }
                else
                {
                    AmbientLights.lightOverride = true;
                    AmbientLights.SetLightsIntensity(0f);

                    Log("Ambient Lights: Off", true, false, true);

                    /*HUDMessage.AddMessage("Ambient Lights: Off");
                     * if (AmbientLights.debugVer)
                     *  Debug.Log("Ambient Lights: Off");*/
                }
            }

            if (InputManager.GetKeyDown(InputManager.m_CurrentContext, KeyCode.L) && InputManager.GetSprintDown(InputManager.m_CurrentContext) && AmbientLights.debugVer)
            {
                AmbientLights.Unload(true);
                AmbientLights.Reset(false);
                AmbientLights.LoadConfigs();
                //HUDMessage.AddMessage("Reloading Config");
                Log("Reloading Scene Config", true, false, true);
            }

            if (InputManager.GetKeyDown(InputManager.m_CurrentContext, KeyCode.Z) && !InputManager.GetSprintDown(InputManager.m_CurrentContext) && AmbientLights.debugVer)
            {
                GetPoint();
            }

            if (InputManager.GetKeyDown(InputManager.m_CurrentContext, KeyCode.Z) && InputManager.GetSprintDown(InputManager.m_CurrentContext) && AmbientLights.debugVer)
            {
                ShowGameLights();
            }

            if (InputManager.GetKeyDown(InputManager.m_CurrentContext, KeyCode.F6) && AmbientLights.debugVer)
            {
                TimeWeather.GetCurrentPeriodAndWeather();

                //HUDMessage.AddMessage(AmbientLights.currentScene + " " + TimeWeather.GetCurrentTimeString() + " - " + TimeWeather.currentWeather + " (" + (Math.Round(TimeWeather.currentWeatherPct, 2) * 100) + " %)" + TimeWeather.currentPeriod + "(" + (Math.Round(TimeWeather.currentPeriodPct, 2) * 100) + "%)");

                Log("Environment data: " + AmbientLights.currentScene + " " + TimeWeather.GetCurrentTimeString() + " - " + TimeWeather.currentWeather + " (" + (Math.Round(TimeWeather.currentWeatherPct, 2) * 100) + " %)" + TimeWeather.currentPeriod + "(" + (Math.Round(TimeWeather.currentPeriodPct, 2) * 100) + "%)", true);

                ALUtils.debugNext = true;
            }
        }
Ejemplo n.º 2
0
 private static void Postfix(MissionServicesManager __instance)
 {
     //MelonLoader.MelonLogger.Log("[AL] SceneUnloaded");
     AmbientLights.Unload();
 }
Ejemplo n.º 3
0
 public static void Postfix(SaveGameSystem __instance, string name, string sceneSaveName)
 {
     //MelonLoader.MelonLogger.Log("[AL] Unload and load");
     AmbientLights.Unload();
     AmbientLights.LoadConfigs();
 }