Пример #1
0
        public static void Postfix(ref WeatherSystem __instance)
        {
            if (Menu.ForceWeather >= 0 && LocalPlayer.IsInWorld)
            {
                __instance.AllOff();
                Scene.RainFollowGO.SetActive(true);
                Scene.RainTypes.SnowConstant.SetActive(false);

                if (Menu.ForceWeather == 1)
                {
                    __instance.TurnOn(WeatherSystem.RainTypes.Light);
                }
                if (Menu.ForceWeather == 2)
                {
                    __instance.TurnOn(WeatherSystem.RainTypes.Medium);
                }
                if (Menu.ForceWeather == 3)
                {
                    __instance.TurnOn(WeatherSystem.RainTypes.Heavy);
                }
                if (Menu.ForceWeather == 4)
                {
                    __instance.GrowClouds();
                    __instance.ReduceClouds();
                }
                if (Menu.ForceWeather == 5)
                {
                    Scene.RainTypes.SnowLight.SetActive(true);
                }
                if (Menu.ForceWeather == 6)
                {
                    Scene.RainTypes.SnowMedium.SetActive(true);
                }
                if (Menu.ForceWeather == 7)
                {
                    Scene.RainTypes.SnowHeavy.SetActive(true);
                }

                Menu.ForceWeather = -1;
            }
        }