diff --git a/ClimatesOfFerngill/ClimatesOfFerngillRebuild.cs b/ClimatesOfFerngill/ClimatesOfFerngillRebuild.cs index 5db6455..ab55eec 100644 --- a/ClimatesOfFerngill/ClimatesOfFerngillRebuild.cs +++ b/ClimatesOfFerngill/ClimatesOfFerngillRebuild.cs @@ -152,12 +152,14 @@ public override void Entry(IModHelper helper) ControlEvents.KeyPressed += (sender, e) => this.ReceiveKeyPress(e.KeyPressed, this.WeatherOpt.Keyboard); MenuEvents.MenuClosed += (sender, e) => this.ReceiveMenuClosed(e.PriorMenu); - + //console commands helper.ConsoleCommands .Add("weather_settommorowweather", helper.Translation.Get("console-text.desc_tmrweather"), TmrwWeatherChangeFromConsole) .Add("weather_setweather", helper.Translation.Get("console-text.desc_setweather"), WeatherChangeFromConsole) - .Add("debug_changecondt", "Changes conditions. Debug function.", DebugChgCondition); + .Add("debug_changecondt", "Changes conditions. Debug function.", DebugChgCondition) + .Add("debug_forceheatwave", "Force heatwave. Debug function", ForceHeatwave) + .Add("debug_forcefrost", "Force frost. Debug function", ForceFrost); } private void MenuEvents_MenuChanged(object sender, EventArgsClickableMenuChanged e) @@ -795,6 +797,16 @@ private bool CheckForForceDay(SDate Target) * ************************************************************** */ + private void ForceFrost(string arg1, string[] arg2) + { + CurrentWeather.ForceFrost(); + } + + private void ForceHeatwave(string arg1, string[] arg2) + { + CurrentWeather.ForceHeatwave(); + } + /// /// This function changes the weather (Console Command) /// diff --git a/ClimatesOfFerngill/WeatherConditions.cs b/ClimatesOfFerngill/WeatherConditions.cs index 923514d..6478ef5 100644 --- a/ClimatesOfFerngill/WeatherConditions.cs +++ b/ClimatesOfFerngill/WeatherConditions.cs @@ -61,6 +61,16 @@ public bool IsDangerousWeather() return false; } + public void ForceFrost() + { + UnusualWeather = SpecialWeather.Frost; + } + + public void ForceHeatwave() + { + UnusualWeather = SpecialWeather.Heatwave; + } + public void OnNewDay() { TodayWeather = 0;