From d4b54ff6c3cf7230bbf5c6f01e49d15954e29e72 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Sun, 4 Feb 2018 20:43:02 -0800 Subject: [PATCH] - update mod to 1.3 and update CCR to 1.1.1 - see readme for changes. --- ClimatesOfFerngill/Assets/WeatherIcons2.png | Bin 9177 -> 8928 bytes ClimatesOfFerngill/ClimatesOfFerngill.csproj | 1 + .../ClimatesOfFerngillRebuild.cs | 30 ++- ClimatesOfFerngill/Descriptions.cs | 111 ++++++----- ClimatesOfFerngill/README.md | 48 ++++- ClimatesOfFerngill/Sprites.cs | 9 +- ClimatesOfFerngill/StaminaDrain.cs | 8 +- ClimatesOfFerngill/WeatherMenu.cs | 131 +++---------- ClimatesOfFerngill/Weathers/CurrentWeather.cs | 3 +- .../Weathers/FerngillBlizzard.cs | 15 +- ClimatesOfFerngill/Weathers/FerngillFog.cs | 44 ++--- .../Weathers/FerngillWhiteOut.cs | 177 ++++++++++++++++++ ClimatesOfFerngill/Weathers/ISDVWeather.cs | 1 + .../Weathers/WeatherConditions.cs | 94 ++++++++-- ClimatesOfFerngill/Weathers/WeatherIcon.cs | 4 +- ClimatesOfFerngill/i18n/default.json | 119 ++++++------ ClimatesOfFerngill/manifest.json | 2 +- .../CustomizableCartRedux.cs | 113 ++++++++++- CustomizableCartRedux/manifest.json | 4 +- SolarEclipseEvent/manifest.json | 7 +- TimeReminder/TimeReminder.cs | 25 --- 21 files changed, 633 insertions(+), 313 deletions(-) create mode 100644 ClimatesOfFerngill/Weathers/FerngillWhiteOut.cs diff --git a/ClimatesOfFerngill/Assets/WeatherIcons2.png b/ClimatesOfFerngill/Assets/WeatherIcons2.png index 1c5d78c134af7605bf67430e2d13f724b2cecffb..703dec0c4de52c0594e73ddf127fa49167ea066d 100644 GIT binary patch literal 8928 zcmb_?cT^Ky_b!TbLPx5ECMYPq8$ca=@}wo}7f;FU>2=ZfGOaJBrng5e47`7L zkuD(&_ge{!@w}ZTuh+(IXy=ZS`cFF(k_i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`)B^P^~>?t)w;dLOpC99OxmIcT#)baXFgDuCMNMRENU7%Q$TVKXC&!A`_|(? z7L(YMKE`m=-i=1Zq()q`oSBD-Q)8o{ApJj^@YX)~+hmp!b*ypvw%02=2nsT)(jZB* G@c#o!5JqYM diff --git a/ClimatesOfFerngill/ClimatesOfFerngill.csproj b/ClimatesOfFerngill/ClimatesOfFerngill.csproj index c6d94fb..2bb9a98 100644 --- a/ClimatesOfFerngill/ClimatesOfFerngill.csproj +++ b/ClimatesOfFerngill/ClimatesOfFerngill.csproj @@ -58,6 +58,7 @@ + diff --git a/ClimatesOfFerngill/ClimatesOfFerngillRebuild.cs b/ClimatesOfFerngill/ClimatesOfFerngillRebuild.cs index 132dbf8..0d9a73d 100644 --- a/ClimatesOfFerngill/ClimatesOfFerngillRebuild.cs +++ b/ClimatesOfFerngill/ClimatesOfFerngillRebuild.cs @@ -797,30 +797,58 @@ private void WeatherChangeFromConsole(string arg1, string[] arg2) Game1.isSnowing = Game1.isLightning = Game1.isDebrisWeather = false; Game1.isRaining = true; Game1.debrisWeather.Clear(); + Conditions.GetWeatherMatchingType("Blizzard").First().EndWeather(); + Conditions.GetWeatherMatchingType("WhiteOut").First().EndWeather(); Monitor.Log(Helper.Translation.Get("console-text.weatherset_rain"), LogLevel.Info); break; case "storm": Game1.isSnowing = Game1.isDebrisWeather = false; Game1.isLightning = Game1.isRaining = true; Game1.debrisWeather.Clear(); + Conditions.GetWeatherMatchingType("Blizzard").First().EndWeather(); + Conditions.GetWeatherMatchingType("WhiteOut").First().EndWeather(); Monitor.Log(Helper.Translation.Get("console-text.weatherset_storm"), LogLevel.Info); break; case "snow": Game1.isRaining = Game1.isLightning = Game1.isDebrisWeather = false; Game1.isSnowing = true; Game1.debrisWeather.Clear(); + Conditions.GetWeatherMatchingType("Blizzard").First().EndWeather(); + Conditions.GetWeatherMatchingType("WhiteOut").First().EndWeather(); Monitor.Log(Helper.Translation.Get("console-text.weatherset_snow"), LogLevel.Info); break; case "debris": Game1.isSnowing = Game1.isLightning = Game1.isRaining = false; + Conditions.GetWeatherMatchingType("Blizzard").First().EndWeather(); + Conditions.GetWeatherMatchingType("Fog").First().EndWeather(); + Conditions.GetWeatherMatchingType("WhiteOut").First().EndWeather(); Game1.isDebrisWeather = true; Game1.populateDebrisWeatherArray(); Monitor.Log(Helper.Translation.Get("console-text.weatherset_debris", LogLevel.Info)); break; case "sunny": + Conditions.GetWeatherMatchingType("Blizzard").First().EndWeather(); + Conditions.GetWeatherMatchingType("Fog").First().EndWeather(); + Conditions.GetWeatherMatchingType("WhiteOut").First().EndWeather(); Game1.isSnowing = Game1.isLightning = Game1.isRaining = Game1.isRaining = false; Monitor.Log(Helper.Translation.Get("console-text.weatherset_sun", LogLevel.Info)); break; + case "blizzard": + Game1.isRaining = Game1.isLightning = Game1.isDebrisWeather = false; + Game1.isSnowing = true; + Game1.debrisWeather.Clear(); + Conditions.GetWeatherMatchingType("Blizzard").First().CreateWeather(); + Conditions.GetWeatherMatchingType("WhiteOut").First().EndWeather(); + Monitor.Log(Helper.Translation.Get("console-text.weatherset_snow"), LogLevel.Info); + break; + case "whiteout": + Game1.isRaining = Game1.isLightning = Game1.isDebrisWeather = false; + Game1.isSnowing = true; + Game1.debrisWeather.Clear(); + Conditions.GetWeatherMatchingType("Blizzard").First().CreateWeather(); + Conditions.GetWeatherMatchingType("WhiteOut").First().CreateWeather(); + Monitor.Log(Helper.Translation.Get("console-text.weatherset_snow"), LogLevel.Info); + break; } Game1.updateWeatherIcon(); @@ -927,7 +955,7 @@ private void ShowMenu() // show menu this.PreviousMenu = Game1.activeClickableMenu; Game1.activeClickableMenu = new WeatherMenu(Monitor, this.Helper.Reflection, OurIcons, Helper.Translation, Conditions, - OurMoon, WeatherOpt, 160, MenuText); + OurMoon, WeatherOpt, MenuText); } /// diff --git a/ClimatesOfFerngill/Descriptions.cs b/ClimatesOfFerngill/Descriptions.cs index dff3100..5c6e423 100644 --- a/ClimatesOfFerngill/Descriptions.cs +++ b/ClimatesOfFerngill/Descriptions.cs @@ -60,7 +60,7 @@ private string GetTemperatureString(double temp) } else { - return $"{temp.ToString("N1")}"; + return $"{temp.ToString("N1")} C"; } } @@ -76,8 +76,14 @@ internal string UpperSeason(string season) internal string GenerateMenuPopup(WeatherConditions Current, SDVMoon Moon) { + string text = ""; - string text = Helper.Get("weather-menu.opening", new { descDay = Helper.Get($"date{UpperSeason(SDate.Now().Season)}{SDate.Now().Day}") }) + Environment.NewLine + Environment.NewLine; + if (SDate.Now().Season == "spring" && SDate.Now().Day == 1) + text = Helper.Get("weather-menu.openingS1D1", new { descDay = Helper.Get($"date{UpperSeason(SDate.Now().Season)}{SDate.Now().Day}") }) + Environment.NewLine + Environment.NewLine; + else if (SDate.Now().Season == "winter" && SDate.Now().Day == 28) + text = Helper.Get("weather-menu.openingS4D28", new { descDay = Helper.Get($"date{UpperSeason(SDate.Now().Season)}{SDate.Now().Day}") }) + Environment.NewLine + Environment.NewLine; + else + text = Helper.Get("weather-menu.opening", new { descDay = Helper.Get($"date{UpperSeason(SDate.Now().Season)}{SDate.Now().Day}") }) + Environment.NewLine + Environment.NewLine; if (Current.ContainsCondition(CurrentWeather.Heatwave)) { @@ -85,30 +91,36 @@ internal string GenerateMenuPopup(WeatherConditions Current, SDVMoon Moon) } if (Current.ContainsCondition(CurrentWeather.Frost)) - { + { text += Helper.Get("weather-menu.condition.frost") + Environment.NewLine; } + ISDVWeather CurrentFog = Current.GetWeatherMatchingType("Fog").First(); + string fogString = ""; + + // If the fog is visible, we don't need to display fog information. However, if it's in the morning, + // and we know evening fog is likely, we should display the message it's expected + // That said, if it's not, we need to pull the fog information down, assuming it's been reset. This checks that the fog end + // time is *before* now. To avoid nested trinary statements.. + if (SDVTime.CurrentTime < CurrentFog.WeatherExpirationTime && Current.GenerateEveningFog && CurrentFog.WeatherBeginTime < new SDVTime(1200)) + fogString = Helper.Get("weather-menu.expectedFog"); + if (CurrentFog.WeatherBeginTime > SDVTime.CurrentTime && Current.GenerateEveningFog) + fogString = Helper.Get("weather-menu.fogFuture", + new + { + fogTime = CurrentFog.WeatherBeginTime.ToString(), + endFog = CurrentFog.WeatherExpirationTime.ToString() + }); + //Current Conditions. text += Helper.Get("weather-menu.current", new { - todayCondition = (Current.HasWeather(CurrentWeather.Fog) ? Helper.Get("weather-menu.fog", new { condition = GetBasicWeather(Current, Game1.currentSeason) }) : GetBasicWeather(Current, Game1.currentSeason)), - todayHigh = GetTemperatureString(Current.TodayHigh), - todayLow = GetTemperatureString(Current.TodayLow), - fogString = (Current.HasEveningFog? Helper.Get("weather-menu.fogFuture", - new { - fogTime = Current.GetWeatherMatchingType("Fog").First().WeatherBeginTime.ToString(), - endFog = Current.GetWeatherMatchingType("Fog").First().WeatherExpirationTime.ToString() - }) - : (Current.GetWeatherMatchingType("Fog").First().IsWeatherVisible? - Helper.Get("weather-menu.fog", - new { - fogTime = Current.GetWeatherMatchingType("Fog").First().IsWeatherVisible ? - Current.GetWeatherMatchingType("Fog").First().WeatherExpirationTime.ToString(): "" - }) : "") - ) + todayCondition = Current.HasWeather(CurrentWeather.Fog) ? Helper.Get("weather-menu.fog", new { condition = GetBasicWeather(Current, Game1.currentSeason), fogTime = CurrentFog.IsWeatherVisible ? CurrentFog.WeatherExpirationTime.ToString() : "" }) : GetBasicWeather(Current, Game1.currentSeason), + + todayHigh = GetTemperatureString(Current.TodayHigh), + todayLow = GetTemperatureString(Current.TodayLow), + fogString = fogString }) + Environment.NewLine; - text += Environment.NewLine; //Tomorrow weather text += Helper.Get("weather-menu.tomorrow", @@ -133,10 +145,11 @@ internal string GenerateTVForecast(WeatherConditions Current, SDVMoon Moon) { "fogTime", Current.GetFogTime().ToString() }, { "todayHigh", GetTemperatureString(Current.TodayHigh) }, { "todayLow", GetTemperatureString(Current.TodayLow) }, - { "tomorrowWeather", GetWeather(Game1.weatherForTomorrow, Game1.currentSeason) }, + { "tomorrowWeather", GetWeather(Game1.weatherForTomorrow, Game1.currentSeason, true) }, { "tomorrowHigh", GetTemperatureString(Current.TomorrowHigh) }, { "tomorrowLow", GetTemperatureString(Current.TomorrowLow) }, { "condWarning", GetCondWarning(Current) }, + { "condString", GetCondWarning(Current) }, { "eveningFog", GetEveningFog(Current) } }; @@ -153,10 +166,10 @@ internal string GenerateTVForecast(WeatherConditions Current, SDVMoon Moon) //festival today else if (Current.HasWeather(CurrentWeather.Festival)) { - return Helper.Get("weat-fesTomorrow.0", talkParams); + return Helper.Get("weat-fesToday.0", talkParams); } - //festival tomrrow + //festival tomorrow else if (SDVUtilities.GetFestivalName(SDate.Now().AddDays(1)) != "") { return Helper.Get("weat-fesTomorrow.0", talkParams); @@ -201,17 +214,24 @@ internal string GenerateTVForecast(WeatherConditions Current, SDVMoon Moon) private string GetEveningFog(WeatherConditions Current) { - if (Current.HasEveningFog) + if (Current.GenerateEveningFog) { var fList = Current.GetWeatherMatchingType("Fog"); foreach (ISDVWeather weat in fList) { if (weat is FerngillFog fWeat) { - return Helper.Get("weather-condition.evenFog", new { startTime = fWeat.WeatherBeginTime.ToString(), endTime = fWeat.WeatherExpirationTime.ToString() }); + if (Current.GetWeatherMatchingType("Fog").First().IsWeatherVisible && (SDVTime.CurrentTime > new SDVTime(1200))) + return Helper.Get("weather-condition.fog", new { fogTime = fWeat.WeatherExpirationTime.ToString() }); + else + { + if (fWeat.WeatherBeginTime != fWeat.WeatherExpirationTime) + return Helper.Get("weather-condition.evenFog", new { startTime = fWeat.WeatherBeginTime.ToString(), endTime = fWeat.WeatherExpirationTime.ToString() }); + else + return ""; + } } } - return ""; } else @@ -222,34 +242,35 @@ private string GetCondWarning(WeatherConditions Current) { int rNumber = OurDice.Next(2); if (Current.ContainsCondition(CurrentWeather.Heatwave)) - { return Helper.Get($"weather-condition.heatwave.{rNumber}"); - } if (Current.ContainsCondition(CurrentWeather.Frost)) - { return Helper.Get($"weather-condition.frost.{rNumber}"); - } + + if (Current.ContainsCondition(CurrentWeather.WhiteOut)) + return Helper.Get($"weather-condition.whiteout.{rNumber}"); return ""; } - private string GetWeather(int weather, string season) + private string GetWeather(int weather, string season, bool TomorrowWeather = false) { int rNumber = OurDice.Next(2); if (weather == Game1.weather_debris) return Helper.Get($"weat-{season}.debris.{rNumber}"); - else if (weather == Game1.weather_festival || weather == Game1.weather_wedding) - return Helper.Get($"weat-{season}.sunny.{rNumber}"); + else if (weather == Game1.weather_festival || weather == Game1.weather_wedding || weather == Game1.weather_sunny && SDVTime.CurrentIntTime < Game1.getModeratelyDarkTime() && !TomorrowWeather) + return Helper.Get($"weat-{season}.sunny_daytime.{rNumber}"); + else if (weather == Game1.weather_festival || weather == Game1.weather_wedding || weather == Game1.weather_sunny && SDVTime.CurrentIntTime >= Game1.getModeratelyDarkTime() && !TomorrowWeather) + return Helper.Get($"weat-{season}.sunny_nighttime.{rNumber}"); + else if (weather == Game1.weather_festival || weather == Game1.weather_wedding || weather == Game1.weather_sunny && TomorrowWeather) + return Helper.Get($"weat-{season}.sunny_daytime.{rNumber}"); else if (weather == Game1.weather_lightning) return Helper.Get($"weat-{season}.stormy.{rNumber}"); else if (weather == Game1.weather_rain) return Helper.Get($"weat-{season}.rainy.{rNumber}"); else if (weather == Game1.weather_snow) return Helper.Get($"weat-{season}.snow.{rNumber}"); - else if (weather == Game1.weather_sunny) - return Helper.Get($"weat-{season}.sunny.{rNumber}"); return "ERROR"; } @@ -276,16 +297,16 @@ private string GetBasicWeather(int weather, string season) private string GetBasicWeather(WeatherConditions Weather, string season) { - int rNumber = OurDice.Next(2); - - if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconBlizzard) + if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconBlizzard || Weather.CurrentWeatherIconBasic == WeatherIcon.IconWhiteOut) return Helper.Get($"weather_blizzard"); else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconSpringDebris || Weather.CurrentWeatherIconBasic == WeatherIcon.IconDebris) return Helper.Get($"weather_wind"); else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconDryLightning) return Helper.Get($"weather_drylightning"); - else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconSunny) - return Helper.Get($"weather_sunny"); + else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconSunny && SDVTime.CurrentIntTime < Game1.getModeratelyDarkTime()) + return Helper.Get($"weather_sunny_daytime"); + else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconSunny && SDVTime.CurrentIntTime >= Game1.getModeratelyDarkTime()) + return Helper.Get($"weather_sunny_nighttime"); else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconStorm) return Helper.Get($"weather_lightning"); else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconSnow) @@ -301,19 +322,20 @@ private string GetBasicWeather(WeatherConditions Weather, string season) return "ERROR"; } - private string GetWeather(WeatherConditions Weather, string season) { int rNumber = OurDice.Next(2); - if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconBlizzard) + if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconBlizzard || Weather.CurrentWeatherIconBasic == WeatherIcon.IconWhiteOut) return Helper.Get($"weat-{season}.blizzard.{rNumber}"); else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconSpringDebris || Weather.CurrentWeatherIconBasic == WeatherIcon.IconDebris) return Helper.Get($"weat-{season}.debris.{rNumber}"); else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconDryLightning) return Helper.Get($"weat-{season}.drylightning.{rNumber}"); - else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconSunny) - return Helper.Get($"weat-{season}.sunny.{rNumber}"); + else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconWedding || Weather.CurrentWeatherIconBasic == WeatherIcon.IconFestival || Weather.CurrentWeatherIconBasic == WeatherIcon.IconSunny && SDVTime.CurrentIntTime < Game1.getModeratelyDarkTime()) + return Helper.Get($"weat-{season}.sunny_daytime.{rNumber}"); + else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconSunny || Weather.CurrentWeatherIconBasic == WeatherIcon.IconWedding || Weather.CurrentWeatherIconBasic == WeatherIcon.IconFestival && SDVTime.CurrentIntTime >= Game1.getModeratelyDarkTime()) + return Helper.Get($"weat-{season}.sunny_nighttime.{rNumber}"); else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconStorm) return Helper.Get($"weat-{season}.stormy.{rNumber}"); else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconSnow) @@ -322,8 +344,6 @@ private string GetWeather(WeatherConditions Weather, string season) return Helper.Get($"weat-{season}.rainy.{rNumber}"); else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconThunderSnow) return Helper.Get($"weat-{season}.thundersnow.{rNumber}"); - else if (Weather.CurrentWeatherIconBasic == WeatherIcon.IconWedding || Weather.CurrentWeatherIconBasic == WeatherIcon.IconFestival) - return Helper.Get($"weat-{season}.sunny.{rNumber}"); return "ERROR"; } @@ -361,6 +381,7 @@ internal TemporaryAnimatedSprite GetWeatherOverlay(WeatherConditions Current, TV break; case WeatherIcon.IconSnow: case WeatherIcon.IconBlizzard: + case WeatherIcon.IconWhiteOut: placement = new Rectangle(465, 346, 13, 13); break; } diff --git a/ClimatesOfFerngill/README.md b/ClimatesOfFerngill/README.md index 0237e8a..2b16e5e 100644 --- a/ClimatesOfFerngill/README.md +++ b/ClimatesOfFerngill/README.md @@ -1,12 +1,13 @@ # Climates of Ferngill (Rebuild) You Can (Not) Have Weather -Current Version (1 January 2018): v1.3-beta1 +Current Version (4 Feburary 2018): 1.3 ## What's New - Fog! - Blizzards, Thundersnow - A more customizable weather system +- More descriptive and varied weather reports ## Requirements @@ -39,13 +40,14 @@ Every ten minutes, the mod checks to see if you've been outside for a certain pe *Special Weathers: Thundersnow, Blizzard (NB: While you incur a stamina penalty for being sick in fog, it deliberately does not trigger this.) -The penalties are cumulative - that is, they add up to the final multiplier. +The penalties are **cumulative** - that is, they add up to the final multiplier. *Lightning : +100% ( 1) *Thundersnow: +100% (1) *Thundersnow (nighttime): +50% (.5) *Foggy: +50% (.5) *Foggy (nightime) +25% (.25) *Blizzard: +125% (1.25) +*Blizzard: **White Out**+225% (2.25) *Blizzard (nighttime) +50% (.5) *Frost (nightime): +125% (1.25) - this is not during the winter. During winter, the frost penalty is untriggered. *Heatwave (daytime): +125% (1.25) @@ -55,7 +57,7 @@ The calculated number is then rounded __down__ For example, therefore, if you're outduring a storm, with the base of 2, you only take a stamina penalty of 2. But if it's also a heatwave, your penatly is now (+1+1.25)=*2.25 or 4.5. So a penalty of 4. If you're out in a blizzard during the day, it's *1.25 or 2.5 rounded down to 2. If you're out in that blizzard at night, another .5 (1.25+.5) is added making it 1.75 or 3.5 rounded down to 3. -(This does mean a foggy blizzard at night is (+.5+.25+1.25+.5 or *2.25), and if you somehow get this in fall, would be *3.5) +(This does mean a foggy blizzard at night is (+.5+.25+1.25+.5 or *2.25), and if you somehow get this in fall, would be *3.5. And somehow, if you get a whiteout, it would be *3.25 and *4.5!) ## Known Issues @@ -70,6 +72,36 @@ If you're out in a blizzard during the day, it's *1.25 or 2.5 rounded down to 2. - ChefRude for testing and the night icon sprites (as well as better fog textures) ## Changelog +v1.3 +- custom popup text on first and last day of the year + +v1.3beta8 + - updated descriptors for (sunny, at night) + - updated evening fog descriptor to not show the fog beginning once started + - added special descriptors for the easter egg. + - some differnation done on current descriptors + - fixed some issues lingering with fog lines not spacing correctly + - refined some of the text to read more cleanly + - added conversion chance for snow in spring if it's cold enough + +v1.3beta7 + - Updated the console command code to be more.. proper. + - Added a easter egg blizzard mode. + +v1.3beta6 + - ISDVWeather now implements a EndWeather + - Console commands can now arbitarily trigger blizzards + - Fog code cleaned up to remove old code + - Sprites cleaned up to remove old sprite code. + - Festival text fixes + +v1.3beta5 +- fog text fixes (remove duplicate fog text, evening fog properly display) + +v1.3beta4 +- text fixes (fog Time not appearing, temperature string incomplete) +- modified the menu screen to work properly over fog. + v1.3beta3 - .. somehow the text fixes didn't take? - cleaned up various elements of the code - no longer attempts to IAssetEditor @@ -239,14 +271,14 @@ over a certain value.). Valid 0-1, but it's recommended that this is kept low. D - 'ChanceOfGettingSick' - Controls the chance you'll get sick when conditions are matched. Default is set to '.7' for (70% chance). Valid Range is 0 to 1. - - 'Use12HourTime' - Tells it whether or not to use 12hour time or not in displays. Defaults to false. + - 'Use12HourTime' - Tells it whether or not to use 12hour time or not in displays. Defaults to false. Valid: true, false - 'BadMoonRising' - Chance of a blood moon on a full moon. Default: .004 (.4%). Valid Range is 0 to 1. - - 'EclipseOn' - Whether or not the eclipse is enabled. Defaults to on. (NOTE: Will not trigger until at least Spring 2, and must be a full moon.) + - 'EclipseOn' - Whether or not the eclipse is enabled. Defaults to true. (NOTE: Will not trigger until at least Spring 2, and must be a full moon.) (valid: true, false) - - 'EclipseChance' - The chance of an eclipse every full moon. Defaults to 1.5%. + - 'EclipseChance' - The chance of an eclipse every full moon. Defaults to .015 (1.5%) Valid Range is 0 to 1. - - 'SpawnMonsters' - Controls if monsters spawn on your wilderness farm. Default: on + - 'SpawnMonsters' - Controls if monsters spawn on your wilderness farm. Default: true. Valid: true, false - - 'SpawnMonstersAllFarms' - Controls if monsters spawn on all farms. Default: off \ No newline at end of file + - 'SpawnMonstersAllFarms' - Controls if monsters spawn on all farms. Default: false. Valid: true, false \ No newline at end of file diff --git a/ClimatesOfFerngill/Sprites.cs b/ClimatesOfFerngill/Sprites.cs index 46b509d..b194796 100644 --- a/ClimatesOfFerngill/Sprites.cs +++ b/ClimatesOfFerngill/Sprites.cs @@ -143,14 +143,7 @@ public Rectangle GetWeatherSprite(CurrentWeather condition) public static readonly Rectangle WeatherFestival = new Rectangle(235, 32, 47, 45); public static readonly Rectangle WeatherBlizzard = new Rectangle(281, 32, 40, 42); public static readonly Rectangle WeatherDryLightning = new Rectangle(321,32,33,39); - public static readonly Rectangle WeatherThundersnow = new Rectangle(355,31,39,40); - - /// A down arrow for scrolling content. - public static readonly Rectangle DownArrow = new Rectangle(12, 76, 40, 44); - - /// An up arrow for scrolling content. - public static readonly Rectangle UpArrow = new Rectangle(76, 72, 40, 44); - + public static readonly Rectangle WeatherThundersnow = new Rectangle(355,31,39,40); } public static Texture2D Pixel => LazyPixel.Value; diff --git a/ClimatesOfFerngill/StaminaDrain.cs b/ClimatesOfFerngill/StaminaDrain.cs index 2ce1025..e5a4517 100644 --- a/ClimatesOfFerngill/StaminaDrain.cs +++ b/ClimatesOfFerngill/StaminaDrain.cs @@ -145,12 +145,18 @@ public int TenMinuteTick(WeatherConditions conditions, int ticksOutside, int tic condList.Add("Night Fog"); } - if (this.FarmerSick && conditions.GetCurrentConditions().HasFlag(CurrentWeather.Blizzard)) + if (this.FarmerSick && conditions.GetCurrentConditions().HasFlag(CurrentWeather.Blizzard) && !conditions.GetCurrentConditions().HasFlag(CurrentWeather.WhiteOut)) { totalMulti += 1.25; condList.Add("Blizzard"); } + if (this.FarmerSick && conditions.GetCurrentConditions().HasFlag(CurrentWeather.Blizzard) && conditions.GetCurrentConditions().HasFlag(CurrentWeather.WhiteOut)) + { + totalMulti += 2.25; + condList.Add("White Out"); + } + if (this.FarmerSick && conditions.GetCurrentConditions().HasFlag(CurrentWeather.Frost) && SDVTime.IsNight) { totalMulti += 1.25; diff --git a/ClimatesOfFerngill/WeatherMenu.cs b/ClimatesOfFerngill/WeatherMenu.cs index ce94b32..7593b20 100644 --- a/ClimatesOfFerngill/WeatherMenu.cs +++ b/ClimatesOfFerngill/WeatherMenu.cs @@ -8,10 +8,6 @@ using StardewValley; using StardewValley.Menus; using Pathoschild.Stardew.UIF; -using System.Linq; -using StardewModdingAPI.Utilities; -using TwilightShards.Stardew.Common; -using TwilightShards.Common; namespace ClimatesOfFerngillRebuild { @@ -34,27 +30,9 @@ internal class WeatherMenu : IClickableMenu /// The aspect ratio of the page background. private readonly Vector2 AspectRatio = new Vector2(Sprites.Letter.Sprite.Width, Sprites.Letter.Sprite.Height); - /// The spacing around the scroll buttons. - private readonly int ScrollButtonGutter = 15; - /// To da Moon, Princess! private SDVMoon OurMoon; - /// The amount to scroll long content on each up/down scroll. - private readonly int ScrollAmount; - - /// The clickable 'scroll up' icon. - private readonly ClickableTextureComponent ScrollUpButton; - - /// The clickable 'scroll down' icon. - private readonly ClickableTextureComponent ScrollDownButton; - - /// The maximum pixels to scroll. - private int MaxScroll; - - /// The number of pixels to scroll. - private int CurrentScroll; - /// The current weather status private WeatherConditions CurrentWeather; @@ -78,7 +56,7 @@ internal class WeatherMenu : IClickableMenu ****/ /// Construct an instance. /// Encapsulates logging and monitoring. - public WeatherMenu(IMonitor monitor, IReflectionHelper reflectionHelper, Sprites.Icons Icon, ITranslationHelper Helper, WeatherConditions weat, SDVMoon Termina, WeatherConfig ModCon, int scroll, string text) + public WeatherMenu(IMonitor monitor, IReflectionHelper reflectionHelper, Sprites.Icons Icon, ITranslationHelper Helper, WeatherConditions weat, SDVMoon Termina, WeatherConfig ModCon, string text) { // save data this.MenuText = text; @@ -86,15 +64,10 @@ public WeatherMenu(IMonitor monitor, IReflectionHelper reflectionHelper, Sprites this.Reflection = reflectionHelper; this.Helper = Helper; this.CurrentWeather = weat; - this.ScrollAmount = scroll; this.IconSheet = Icon; this.OurMoon = Termina; this.OurConfig = ModCon; - // add scroll buttons - this.ScrollUpButton = new ClickableTextureComponent(Rectangle.Empty, Sprites.Icons.source2, Sprites.Icons.UpArrow, 1); - this.ScrollDownButton = new ClickableTextureComponent(Rectangle.Empty, Sprites.Icons.source2, Sprites.Icons.DownArrow, 1); - // update layout this.UpdateLayout(); } @@ -103,16 +76,6 @@ public WeatherMenu(IMonitor monitor, IReflectionHelper reflectionHelper, Sprites ** Events ****/ - /// The method invoked when the player scrolls the mouse wheel on the lookup UI. - /// The scroll direction. - public override void receiveScrollWheelAction(int direction) - { - if (direction > 0) // positive number scrolls content up - this.ScrollUp(); - else - this.ScrollDown(); - } - /// The method invoked when the player left-clicks on the lookup UI. /// The X-position of the cursor. /// The Y-position of the cursor. @@ -159,18 +122,6 @@ public override void receiveGamePadButton(Buttons button) ** Methods ****/ - /// Scroll up the menu content by the specified amount (if possible). - public void ScrollUp() - { - this.CurrentScroll -= this.ScrollAmount; - } - - /// Scroll down the menu content by the specified amount (if possible). - public void ScrollDown() - { - this.CurrentScroll += this.ScrollAmount; - } - /// Handle a left-click from the player's mouse or controller. /// The x-position of the cursor. /// The y-position of the cursor. @@ -218,69 +169,43 @@ public override void draw(SpriteBatch spriteBatch) // and I kinda want to have this where I can understand what it's for float spaceWidth = DrawHelper.GetSpaceWidth(font); + // draw background // (This uses a separate sprite batch because it needs to be drawn before the // foreground batch, and we can't use the foreground batch because the background is // outside the clipping area.) - using (SpriteBatch backgroundBatch = new SpriteBatch(Game1.graphics.GraphicsDevice)) + //spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, SamplerState.PointClamp, null, null); + spriteBatch.DrawSprite(Sprites.Letter.Sheet, Sprites.Letter.Sprite, x, y, scale: width / (float)Sprites.Letter.Sprite.Width); + //spriteBatch.End(); + + // begin draw + + // draw weather icon + spriteBatch.Draw(IconSheet.WeatherSource, new Vector2(x + leftOffset, y + topOffset), IconSheet.GetWeatherSprite(CurrentWeather.GetCurrentConditions()), Color.White); + leftOffset += 72; + string weatherString = ""; + + // draw text as sent from outside the menu + float wrapWidth = this.width - leftOffset - gutter; { - backgroundBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, SamplerState.PointClamp, null, null); - backgroundBatch.DrawSprite(Sprites.Letter.Sheet, Sprites.Letter.Sprite, x, y, scale: width / (float)Sprites.Letter.Sprite.Width); - backgroundBatch.End(); - } + Vector2 textSize = spriteBatch.DrawTextBlock(font, MenuText, new Vector2(x + leftOffset, y + topOffset), wrapWidth); + topOffset += textSize.Y; + topOffset += lineHeight; - // draw foreground - // (This uses a separate sprite batch to set a clipping area for scrolling.) - using (SpriteBatch contentBatch = new SpriteBatch(Game1.graphics.GraphicsDevice)) - { - // begin draw - GraphicsDevice device = Game1.graphics.GraphicsDevice; - device.ScissorRectangle = new Rectangle(x + gutter, y + gutter, (int)contentWidth, (int)contentHeight); - contentBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, SamplerState.PointClamp, null, new RasterizerState { ScissorTestEnable = true }); - - // scroll view - this.CurrentScroll = Math.Max(0, this.CurrentScroll); // don't scroll past top - this.CurrentScroll = Math.Min(this.MaxScroll, this.CurrentScroll); // don't scroll past bottom - topOffset -= this.CurrentScroll; // scrolled down == move text up - - // draw weather icon - contentBatch.Draw(IconSheet.WeatherSource, new Vector2(x + leftOffset, y + topOffset), IconSheet.GetWeatherSprite(CurrentWeather.GetCurrentConditions()), Color.White); - leftOffset += 72; - string weatherString = ""; - - // draw text as sent from outside the menu - float wrapWidth = this.width - leftOffset - gutter; - { - Vector2 textSize = contentBatch.DrawTextBlock(font, MenuText, new Vector2(x + leftOffset, y + topOffset), wrapWidth); - topOffset += textSize.Y; - topOffset += lineHeight; - - } - - //draw moon info - contentBatch.Draw(IconSheet.MoonSource, new Vector2(x + 15, y + topOffset), - IconSheet.GetMoonSprite(OurMoon.CurrentPhase), Color.White); - - weatherString = Helper.Get("moon-desc.desc_moonphase", - new { moonPhase = SDVMoon.DescribeMoonPhase(OurMoon.CurrentPhase, Helper)}); + } - Vector2 moonText = contentBatch.DrawTextBlock(font, - weatherString, new Vector2(x + leftOffset, y + topOffset), wrapWidth); + //draw moon info + spriteBatch.Draw(IconSheet.MoonSource, new Vector2(x + 15, y + topOffset), + IconSheet.GetMoonSprite(OurMoon.CurrentPhase), Color.White); - topOffset += lineHeight; //stop moon from being cut off. + weatherString = Helper.Get("moon-desc.desc_moonphase", + new { moonPhase = SDVMoon.DescribeMoonPhase(OurMoon.CurrentPhase, Helper)}); - // update max scroll - this.MaxScroll = Math.Max(0, (int)(topOffset - contentHeight + this.CurrentScroll)); + Vector2 moonText = spriteBatch.DrawTextBlock(font, + weatherString, new Vector2(x + leftOffset, y + topOffset), wrapWidth); - // draw scroll icons - if (this.MaxScroll > 0 && this.CurrentScroll > 0) - this.ScrollUpButton.draw(contentBatch); - if (this.MaxScroll > 0 && this.CurrentScroll < this.MaxScroll) - this.ScrollDownButton.draw(spriteBatch); + topOffset += lineHeight; //stop moon from being cut off. - // end draw - contentBatch.End(); - } this.drawMouse(Game1.spriteBatch); } @@ -303,7 +228,7 @@ private void UpdateLayout() // update up/down buttons int x = this.xPositionOnScreen; int y = this.yPositionOnScreen; - int gutter = this.ScrollButtonGutter; + int gutter = 16; float contentHeight = this.height - gutter * 2; } diff --git a/ClimatesOfFerngill/Weathers/CurrentWeather.cs b/ClimatesOfFerngill/Weathers/CurrentWeather.cs index 487b546..907afd3 100644 --- a/ClimatesOfFerngill/Weathers/CurrentWeather.cs +++ b/ClimatesOfFerngill/Weathers/CurrentWeather.cs @@ -19,6 +19,7 @@ public enum CurrentWeather Blizzard = 256, Fog = 512, Frost = 1024, - Heatwave = 2048 + Heatwave = 2048, + WhiteOut = 4096 } } diff --git a/ClimatesOfFerngill/Weathers/FerngillBlizzard.cs b/ClimatesOfFerngill/Weathers/FerngillBlizzard.cs index 3a7d9bd..3783e44 100644 --- a/ClimatesOfFerngill/Weathers/FerngillBlizzard.cs +++ b/ClimatesOfFerngill/Weathers/FerngillBlizzard.cs @@ -66,6 +66,7 @@ public void SetWeatherTime(SDVTime begin, SDVTime end) public void CreateWeather() { //Blizzards opt to mostly being all day. + BeginTime = new SDVTime(0600); ExpirTime = new SDVTime(2800); if (Dice.NextDouble() >= .5 && Dice.NextDouble() < .8) { @@ -87,6 +88,16 @@ public void CreateWeather() } } + public void EndWeather() + { + if (IsWeatherVisible) + { + IsBlizzard = false; + ExpirTime = new SDVTime(SDVTime.CurrentIntTime - 10); + UpdateStatus(WeatherType, false); + } + } + public void UpdateWeather() { if (!IsWeatherVisible) @@ -94,7 +105,7 @@ public void UpdateWeather() return; } - if (WeatherExpirationTime <= SDVTime.CurrentTime) + if (SDVTime.CurrentTime >= WeatherExpirationTime) { IsBlizzard = false; UpdateStatus(WeatherType, false); @@ -112,7 +123,7 @@ public override string ToString() } public void DrawWeather() - { + { if (IsWeatherVisible && !(Game1.currentLocation is Desert)) { snowPos = Game1.updateFloatingObjectPositionForMovement(snowPos, new Vector2(Game1.viewport.X, Game1.viewport.Y), diff --git a/ClimatesOfFerngill/Weathers/FerngillFog.cs b/ClimatesOfFerngill/Weathers/FerngillFog.cs index a4cf8c4..63d361e 100644 --- a/ClimatesOfFerngill/Weathers/FerngillFog.cs +++ b/ClimatesOfFerngill/Weathers/FerngillFog.cs @@ -11,18 +11,12 @@ namespace ClimatesOfFerngillRebuild { - // This was a class, but honestly, we should probably just move all of the fog things into one struct. /// This tracks fog details internal class FerngillFog : ISDVWeather { public event EventHandler OnUpdateStatus; - //private bool AmbientFog { get; set; } - //private readonly static Rectangle FogSource = new Rectangle(640, 0, 64, 64); public static Rectangle FogSource = new Rectangle(0, 0, 64, 64); - private readonly static Color DarkOutdoor = new Color(180, 175, 105); - private readonly static Color NormalOutdoor = new Color(135, 120, 145); - private Color FogColor = Color.White * 1.25f; internal Icons Sheet; @@ -47,8 +41,6 @@ internal class FerngillFog : ISDVWeather public string WeatherType => "Fog"; - private bool AfternoonFightDet { get; set; } - /// Returns the expiration time of fog. Note that this doesn't sanity check if the fog is even visible. public SDVTime WeatherExpirationTime => (ExpirTime ?? new SDVTime(0600)); public SDVTime WeatherBeginTime => (BeginTime ?? new SDVTime(0600)); @@ -77,11 +69,9 @@ public bool WeatherInProgress /// The time for the fog to expire public void SetWeatherExpirationTime(SDVTime t) => ExpirTime = t; public void SetWeatherBeginTime(SDVTime t) => BeginTime = t; - public SDVTimePeriods FogTimeSpan { get; set; } - + public SDVTimePeriods FogTimeSpan { get; set;} private MersenneTwister Dice { get; set; } private WeatherConfig ModConfig { get; set; } - private bool FadeOutFog { get; set; } private bool FadeInFog { get; set; } private Stopwatch FogElapsed { get; set; } @@ -96,7 +86,6 @@ internal FerngillFog(Icons Sheet, bool Verbose, IMonitor Monitor, MersenneTwiste this.Monitor = Monitor; this.Dice = Dice; this.ModConfig = config; - AfternoonFightDet = false; this.FogTimeSpan = FogPeriod; FogElapsed = new Stopwatch(); } @@ -114,7 +103,6 @@ public void Reset() BeginTime = null; ExpirTime = null; FogAlpha = 0f; - AfternoonFightDet = false; FadeOutFog = false; FadeInFog = false; FogElapsed.Reset(); @@ -204,30 +192,20 @@ public void CreateWeather() UpdateStatus(WeatherType, true); } - public void SetWeatherTime(SDVTime begin, SDVTime end) + public void EndWeather() { - BeginTime = new SDVTime(begin); - ExpirTime = new SDVTime(end); + if (IsWeatherVisible) + { + ExpirTime = new SDVTime(SDVTime.CurrentTime - 10); + CurrentFogType = FogType.None; + UpdateStatus(WeatherType, false); + } } - public Color CalculateEndLight(SDVTime end) + public void SetWeatherTime(SDVTime begin, SDVTime end) { - int endTime = end.ReturnIntTime(); - - if (endTime >= Game1.getTrulyDarkTime()) - { - float num = Math.Min(0.93f, (float)(0.75 + ((int)(endTime - endTime % 100 + endTime % 100 / 10 * 16.6599998474121) - Game1.getTrulyDarkTime() + Game1.gameTimeInterval / 7000.0 * 16.6000003814697) * 0.000624999986030161)); - return (Game1.isRaining ? DarkOutdoor : Game1.eveningColor) * num; - } - else if (endTime >= Game1.getStartingToGetDarkTime()) - { - float num = Math.Min(0.93f, (float)(0.300000011920929 + ((int)(endTime - endTime % 100 + endTime % 100 / 10 * 16.6599998474121) - Game1.getStartingToGetDarkTime() + (double)Game1.gameTimeInterval / 7000.0 * 16.6000003814697) * 0.00224999990314245)); - return (Game1.isRaining ? DarkOutdoor : Game1.eveningColor) * num; - } - else if (Game1.isRaining) - return Game1.ambientLight * 0.3f; - else - return new Color(0, 0, 0); // I have a sneaking suspcion + BeginTime = new SDVTime(begin); + ExpirTime = new SDVTime(end); } public override string ToString() diff --git a/ClimatesOfFerngill/Weathers/FerngillWhiteOut.cs b/ClimatesOfFerngill/Weathers/FerngillWhiteOut.cs new file mode 100644 index 0000000..3da7c40 --- /dev/null +++ b/ClimatesOfFerngill/Weathers/FerngillWhiteOut.cs @@ -0,0 +1,177 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using StardewValley; +using StardewValley.Locations; +using System; +using TwilightShards.Common; +using TwilightShards.Stardew.Common; + +namespace ClimatesOfFerngillRebuild +{ + /// This tracks white out details + internal class FerngillWhiteOut : ISDVWeather + { + /// This is for the second snow overlay. + private Vector2 snowPos; + private Vector2 snowPos2; + public event EventHandler OnUpdateStatus; + private bool IsWhiteout { get; set; } + public bool IsWeatherVisible => IsWhiteout; + private SDVTime ExpirTime; + private SDVTime BeginTime; + + private MersenneTwister Dice; + private WeatherConfig ModConfig; + + public string WeatherType => "WhiteOut"; + public void SetWeatherExpirationTime(SDVTime t) => ExpirTime = t; + public void SetWeatherBeginTime(SDVTime t) => BeginTime = t; + + public SDVTime WeatherExpirationTime => (ExpirTime ?? new SDVTime(0600)); + public SDVTime WeatherBeginTime => (BeginTime ?? new SDVTime(0600)); + public bool WeatherInProgress => (SDVTime.CurrentTime >= BeginTime && SDVTime.CurrentTime <= ExpirTime); + + public FerngillWhiteOut(MersenneTwister Dice, WeatherConfig config) + { + ExpirTime = new SDVTime(2600); + BeginTime = new SDVTime(0600); + this.Dice = Dice; + this.ModConfig = config; + } + + public void UpdateStatus(string weather, bool status) + { + if (OnUpdateStatus == null) return; + + WeatherNotificationArgs args = new WeatherNotificationArgs(weather, status); + OnUpdateStatus(this, args); + } + + public void OnNewDay() + { + IsWhiteout = false; + } + + public void Reset() + { + IsWhiteout = false; + } + + public void SetWeatherTime(SDVTime begin, SDVTime end) + { + BeginTime = new SDVTime(begin); + ExpirTime = new SDVTime(end); + } + + public void CreateWeather() + { + BeginTime = new SDVTime(0600); + ExpirTime = new SDVTime(2800); + if (Dice.NextDouble() >= .5 && Dice.NextDouble() < .8) + { + ExpirTime = new SDVTime(Game1.getModeratelyDarkTime()); + } + if (Dice.NextDouble() >= .8 && Dice.NextDouble() < .95) + { + ExpirTime = new SDVTime((BeginTime.ReturnIntTime() + 1000)); + } + if (Dice.NextDouble() >= .95) + { + ExpirTime = new SDVTime((BeginTime.ReturnIntTime() + 500)); + } + + if (SDVTime.CurrentTime >= BeginTime) + { + IsWhiteout = true; + UpdateStatus(WeatherType, true); + } + } + + public void EndWeather() + { + if (IsWeatherVisible) + { + IsWhiteout = false; + ExpirTime = new SDVTime(SDVTime.CurrentIntTime - 10); + UpdateStatus(WeatherType, false); + } + } + + public void UpdateWeather() + { + if (!IsWeatherVisible) + { + return; + } + + if (SDVTime.CurrentTime >= WeatherExpirationTime) + { + IsWhiteout = false; + UpdateStatus(WeatherType, false); + } + } + + public void MoveWeather() + { + + } + + public override string ToString() + { + return $"White Out Weather from {BeginTime} to {ExpirTime}. Visible: {IsWeatherVisible}. "; + } + + public void DrawWeather() + { + if (IsWeatherVisible && !(Game1.currentLocation is Desert)) + { + snowPos = Game1.updateFloatingObjectPositionForMovement(snowPos, new Vector2(Game1.viewport.X, Game1.viewport.Y), + Game1.previousViewportPosition, -1f); + snowPos.X = snowPos.X % (16 * Game1.pixelZoom); + Vector2 position = new Vector2(); + float num1 = -16 * Game1.pixelZoom + snowPos.X % (16 * Game1.pixelZoom); + while ((double)num1 < Game1.viewport.Width) + { + float num2 = -12 * Game1.pixelZoom + snowPos.Y % (12 * Game1.pixelZoom); + while (num2 < (double)Game1.viewport.Height) + { + position.X = (int)num1; + position.Y = (int)num2; + Game1.spriteBatch.Draw(Game1.mouseCursors, position, new Microsoft.Xna.Framework.Rectangle? + (new Microsoft.Xna.Framework.Rectangle + (368 + (int)((Game1.currentGameTime.TotalGameTime.TotalMilliseconds + 225) % 1200.0) / 75 * 16, 192, 16, 16)), + Color.White * Game1.options.snowTransparency, 0.0f, Vector2.Zero, + Game1.pixelZoom + 1f / 1000f, SpriteEffects.None, 1f); + num2 += 16 * Game1.pixelZoom; + } + num1 += 16 * Game1.pixelZoom; + } + } + + if (IsWeatherVisible && !(Game1.currentLocation is Desert)) + { + snowPos2 = Game1.updateFloatingObjectPositionForMovement(snowPos2, new Vector2(Game1.viewport.X, Game1.viewport.Y), + Game1.previousViewportPosition, -1f); + snowPos2.X = snowPos2.X % (12 * Game1.pixelZoom); + Vector2 position = new Vector2(); + float num1 = -12 * Game1.pixelZoom + snowPos2.X % (12 * Game1.pixelZoom); + while ((double)num1 < Game1.viewport.Width) + { + float num2 = -8 * Game1.pixelZoom + snowPos2.Y % (8 * Game1.pixelZoom); + while (num2 < (double)Game1.viewport.Height) + { + position.X = (int)num1; + position.Y = (int)num2; + Game1.spriteBatch.Draw(Game1.mouseCursors, position, new Microsoft.Xna.Framework.Rectangle? + (new Microsoft.Xna.Framework.Rectangle + (368 + (int)((Game1.currentGameTime.TotalGameTime.TotalMilliseconds + 125) % 1200.0) / 75 * 16, 192, 16, 16)), + Color.White * Game1.options.snowTransparency, 0.0f, Vector2.Zero, + Game1.pixelZoom + 1f / 1000f, SpriteEffects.None, 1f); + num2 += 16 * Game1.pixelZoom; + } + num1 += 16 * Game1.pixelZoom; + } + } + } + } +} \ No newline at end of file diff --git a/ClimatesOfFerngill/Weathers/ISDVWeather.cs b/ClimatesOfFerngill/Weathers/ISDVWeather.cs index 23f4d47..0aef57c 100644 --- a/ClimatesOfFerngill/Weathers/ISDVWeather.cs +++ b/ClimatesOfFerngill/Weathers/ISDVWeather.cs @@ -32,5 +32,6 @@ interface ISDVWeather void UpdateWeather(); void CreateWeather(); void MoveWeather(); + void EndWeather(); } } diff --git a/ClimatesOfFerngill/Weathers/WeatherConditions.cs b/ClimatesOfFerngill/Weathers/WeatherConditions.cs index b121c20..3e18f92 100644 --- a/ClimatesOfFerngill/Weathers/WeatherConditions.cs +++ b/ClimatesOfFerngill/Weathers/WeatherConditions.cs @@ -45,7 +45,7 @@ public class WeatherConditions private bool FogCreationProhibited { get; set; } - public bool HasEveningFog { get => HasSetEveningFog; } + private SDVTime MorningFogExpir { get; set; } /// ************************************************************************* /// ACCESS METHODS @@ -82,12 +82,17 @@ public string FogDescription(double fogRoll, double fogChance) return desc; } - public void CreateWeather(string Type) + public void CreateWeather(string Type, bool IsMorningFog = false) { foreach (ISDVWeather weather in CurrentWeathers) { if (weather.WeatherType == Type) weather.CreateWeather(); + + if (Type == "Fog" && IsMorningFog) + { + MorningFogExpir = weather.WeatherExpirationTime; + } } } @@ -254,7 +259,7 @@ public bool HasPrecip() public WeatherIcon CurrentWeatherIcon { get - { + { if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)CurrentWeather.Rain)) return WeatherIcon.IconRain; @@ -276,6 +281,9 @@ public WeatherIcon CurrentWeatherIcon if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Snow | CurrentWeather.Blizzard))) return WeatherIcon.IconBlizzard; + if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Snow | CurrentWeather.Blizzard | CurrentWeather.WhiteOut))) + return WeatherIcon.IconWhiteOut; + if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)CurrentWeather.Festival)) return WeatherIcon.IconFestival; @@ -340,6 +348,8 @@ public WeatherIcon CurrentWeatherIcon return WeatherIcon.IconSunny; if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Lightning | CurrentWeather.Rain | CurrentWeather.Frost))) return WeatherIcon.IconStorm; + if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Snow | CurrentWeather.Blizzard | CurrentWeather.WhiteOut))) + return WeatherIcon.IconWhiteOut; if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Sunny | CurrentWeather.Frost))) return WeatherIcon.IconSunny; if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Wind | CurrentWeather.Frost))) @@ -353,6 +363,8 @@ public WeatherIcon CurrentWeatherIcon return WeatherIcon.IconSnow; if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Blizzard | CurrentWeather.Snow | CurrentWeather.Frost))) return WeatherIcon.IconBlizzard; + if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Blizzard | CurrentWeather.Snow | CurrentWeather.Frost | CurrentWeather.WhiteOut))) + return WeatherIcon.IconBlizzard; //And now for fog. if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Lightning | CurrentWeather.Fog | CurrentWeather.Sunny))) @@ -372,6 +384,8 @@ public WeatherIcon CurrentWeatherIcon return WeatherIcon.IconSunnyFog; if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Rain | CurrentWeather.Frost | CurrentWeather.Fog))) return WeatherIcon.IconRainFog; + if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Snow | CurrentWeather.Blizzard | CurrentWeather.WhiteOut | CurrentWeather.Fog))) + return WeatherIcon.IconWhiteOutFog; Console.WriteLine($"Error. Current conditions are: {CurrentConditionsN}"); @@ -379,14 +393,7 @@ public WeatherIcon CurrentWeatherIcon } } - public bool BlockFog - { - get { return GenerateEveningFog; } - set - { - GenerateEveningFog = value; - } - } + public bool BlockFog { get; set; } public WeatherIcon CurrentWeatherIconBasic { @@ -413,6 +420,9 @@ public WeatherIcon CurrentWeatherIconBasic if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Snow | CurrentWeather.Blizzard))) return WeatherIcon.IconBlizzard; + if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Blizzard | CurrentWeather.Snow | CurrentWeather.WhiteOut))) + return WeatherIcon.IconWhiteOut; + if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)CurrentWeather.Festival)) return WeatherIcon.IconFestival; @@ -453,7 +463,7 @@ public WeatherIcon CurrentWeatherIconBasic return WeatherIcon.IconStorm; if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Rain | CurrentWeather.Lightning | CurrentWeather.Heatwave | CurrentWeather.Fog))) - return WeatherIcon.IconStormFog; + return WeatherIcon.IconStorm; if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Heatwave | CurrentWeather.Sunny))) return WeatherIcon.IconSunny; @@ -491,6 +501,8 @@ public WeatherIcon CurrentWeatherIconBasic return WeatherIcon.IconSnow; if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Blizzard | CurrentWeather.Snow | CurrentWeather.Frost))) return WeatherIcon.IconBlizzard; + if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Blizzard | CurrentWeather.Snow | CurrentWeather.Frost | CurrentWeather.WhiteOut))) + return WeatherIcon.IconWhiteOut; //And now for fog. if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Lightning | CurrentWeather.Fog | CurrentWeather.Sunny))) @@ -510,6 +522,8 @@ public WeatherIcon CurrentWeatherIconBasic return WeatherIcon.IconSunny; if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Rain | CurrentWeather.Frost | CurrentWeather.Fog))) return WeatherIcon.IconRain; + if (GeneralFunctions.ContainsOnlyMatchingFlags(CurrentConditionsN, (int)(CurrentWeather.Blizzard | CurrentWeather.Snow | CurrentWeather.Fog | CurrentWeather.WhiteOut))) + return WeatherIcon.IconWhiteOut; Console.WriteLine($"Error. Current conditions are: {CurrentConditionsN}"); @@ -537,7 +551,7 @@ public WeatherConditions(Icons Sheets, MersenneTwister Dice, ITranslationHelper CurrentWeathers = new List { new FerngillFog(Sheets, Config.Verbose, monitor, Dice, Config, SDVTimePeriods.Morning), - //new FerngillFog(Sheets, Config.Verbose, monitor, Dice, Config, SDVTimePeriods.Evening), + new FerngillWhiteOut(Dice, Config), new FerngillBlizzard(Dice, Config) }; @@ -547,11 +561,23 @@ public WeatherConditions(Icons Sheets, MersenneTwister Dice, ITranslationHelper private void ProcessWeatherChanges(object sender, WeatherNotificationArgs e) { - if (e.Weather == "Fog") + if (e.Weather == "WhiteOut") { if (e.Present) { - CurrentConditionsN |= CurrentWeather.Fog; + CurrentConditionsN = CurrentConditionsN | CurrentWeather.WhiteOut; + } + else + { + CurrentConditionsN = CurrentConditionsN.RemoveFlags(CurrentWeather.WhiteOut); + } + } + + if (e.Weather == "Fog") + { + if (e.Present) + { + CurrentConditionsN = CurrentConditionsN | CurrentWeather.Fog; } else { @@ -561,8 +587,9 @@ private void ProcessWeatherChanges(object sender, WeatherNotificationArgs e) if (e.Weather == "Blizzard") { + if (e.Present) - CurrentConditionsN |= CurrentWeather.Blizzard; + CurrentConditionsN = CurrentConditionsN | CurrentWeather.Blizzard; else CurrentConditionsN = CurrentConditionsN.RemoveFlags(CurrentWeather.Blizzard); } @@ -600,6 +627,7 @@ public void OnNewDay() CurrentConditionsN = CurrentWeather.Unset; TodayTemps = TomorrowTemps; //If Tomorrow is null, should just allow it to be null. TomorrowTemps = null; + MorningFogExpir = new SDVTime(600); } /// This function resets the weather object to basic. @@ -612,6 +640,7 @@ public void Reset() TodayTemps = null; TomorrowTemps = null; CurrentConditionsN = CurrentWeather.Unset; + MorningFogExpir = new SDVTime(600); } public SDVTime GetFogTime() @@ -663,7 +692,7 @@ internal static CurrentWeather ConvertToCurrentWeather(int weather) } internal void SetTodayWeather() - { + { CurrentConditionsN = CurrentWeather.Unset; //reset the flag. if (!Game1.isDebrisWeather && !Game1.isRaining && !Game1.isSnowing) @@ -683,6 +712,17 @@ internal void SetTodayWeather() if (Game1.weddingToday) AddWeather(CurrentWeather.Wedding); + + //check current weathers. + foreach (ISDVWeather weat in CurrentWeathers) + { + if (weat.WeatherType == "Fog" && weat.IsWeatherVisible) + CurrentConditionsN |= CurrentWeather.Fog; + if (weat.WeatherType == "Blizzard" && weat.IsWeatherVisible) + CurrentConditionsN |= CurrentWeather.Blizzard; + if (weat.WeatherType == "WhiteOut" && weat.IsWeatherVisible) + CurrentConditionsN |= CurrentWeather.WhiteOut; + } } /// Force for wedding only to match vanilla behavior. @@ -856,7 +896,8 @@ internal bool TestForSpecialWeather(double fogChance) // Thundersnow - as Blizzard, but really rare. // Fog - per climate, although night fog in winter is double normal chance - GenerateEveningFog = (Dice.NextDouble() < (Game1.currentSeason == "winter" ? fogChance * 2 : fogChance)) && !this.GetCurrentConditions().HasFlag(CurrentWeather.Wind); + //GenerateEveningFog = (Dice.NextDouble() < (Game1.currentSeason == "winter" ? fogChance * 2 : fogChance)) && !this.GetCurrentConditions().HasFlag(CurrentWeather.Wind); + GenerateEveningFog = true; if (BlockFog) GenerateEveningFog = false; @@ -865,7 +906,7 @@ internal bool TestForSpecialWeather(double fogChance) if (fogRoll < fogChance && !this.GetCurrentConditions().HasFlag(CurrentWeather.Wind) && !BlockFog) { - this.CreateWeather("Fog"); + this.CreateWeather("Fog", true); if (ModConfig.Verbose) Monitor.Log($"{FogDescription(fogRoll, fogChance)}"); @@ -881,6 +922,10 @@ internal bool TestForSpecialWeather(double fogChance) this.CreateWeather("Blizzard"); if (ModConfig.Verbose) Monitor.Log($"With roll {blizRoll.ToString("N3")} against {ModConfig.BlizzardOdds}, there will be blizzards today"); + if (Dice.NextDoublePositive() < .05) + { + this.CreateWeather("WhiteOut"); + } } specialWeatherTriggered = true; @@ -931,6 +976,17 @@ internal bool TestForSpecialWeather(double fogChance) } } + //test for spring conversion.- 50% chance + if (this.HasWeather(CurrentWeather.Rain) && this.HasWeather(CurrentWeather.Frost) && Game1.currentSeason == "spring" && Dice.NextDoublePositive() <= .5) + { + CurrentConditionsN.RemoveFlags(CurrentWeather.Rain); + CurrentConditionsN |= CurrentWeather.Snow; + Game1.isRaining = false; + Game1.isSnowing = true; + specialWeatherTriggered = true; + } + + return specialWeatherTriggered; } } diff --git a/ClimatesOfFerngill/Weathers/WeatherIcon.cs b/ClimatesOfFerngill/Weathers/WeatherIcon.cs index 099c5f7..bd06ea1 100644 --- a/ClimatesOfFerngill/Weathers/WeatherIcon.cs +++ b/ClimatesOfFerngill/Weathers/WeatherIcon.cs @@ -24,6 +24,8 @@ public enum WeatherIcon IconThunderSnow = 17, IconDryLightning = 18, IconDryLightningWind = 19, - IconBloodMoon = 20 + IconWhiteOut = 20, + IconWhiteOutFog = 21, + IconBloodMoon = 99 } } diff --git a/ClimatesOfFerngill/i18n/default.json b/ClimatesOfFerngill/i18n/default.json index 0cda4b3..deed0ea 100644 --- a/ClimatesOfFerngill/i18n/default.json +++ b/ClimatesOfFerngill/i18n/default.json @@ -42,12 +42,12 @@ "fern-loc.11": "Pathos Isle", //Weather - Generic Strings - "weat-loc.0": ".. concludes the weather in {{location}}.#Now for Pelican Town, expect {{descWeather}}, with a high of {{todayHigh}} and low {{todayLow}}.{{condWarning}}{{eveningFog}} #Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}", - "weat-loc.1": "Now for Pelican Town, expect {{descWeather}}, with a high of {{todayHigh}} and low {{todayLow}}.{{condWarning}}{{eveningFog}}#Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}", + "weat-loc.0": ".. concludes the weather in {{location}}.#Now for Pelican Town, expect {{descWeather}}, with a high of {{todayHigh}} and low {{todayLow}}. {{condWarning}}{{eveningFog}} #Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}", + "weat-loc.1": "Now for Pelican Town, expect {{descWeather}}, with a high of {{todayHigh}} and low {{todayLow}}. {{condWarning}}{{eveningFog}}#Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}", "weat-loc.2": "The weather for Stardew Valley will be {{todayWeather}} with a high of {{todayHigh}} and low {{todayLow}}.{{condWarning}}{{eveningFog}}#Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}", - "weat-loc.fog.0": ".. concludes the weather in {{location}}.#Now for Pelican Town, the valley will be blanked in fog until about {{fogTime}}, then expect {{descWeather}}, with a high of {{todayHigh}} and low {{todayLow}}.{{condWarning}}{{eveningFog}}#Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}", - "weat-loc.fog.1": "Now for Pelican Town, fog will continue to blanket the region until roughly {{fogTime}}, then expect {{descWeather}}, with a high of {{todayHigh}} and low {{todayLow}}.{{condWarning}}{{eveningFog}}#Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}.", + "weat-loc.fog.0": ".. concludes the weather in {{location}}.#Now for Pelican Town, the valley will be blanked in fog until about {{fogTime}}, then expect {{descWeather}}, with a high of {{todayHigh}} and low {{todayLow}}. {{condWarning}}{{eveningFog}}#Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}", + "weat-loc.fog.1": "Now for Pelican Town, fog will continue to blanket the region until roughly {{fogTime}}, then expect {{descWeather}}, with a high of {{todayHigh}} and low {{todayLow}}. {{condWarning}}{{eveningFog}}#Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}.", "weat-loc.fog.2": "Fog will be blanketing Stardew Valley until an anticipated {{fogTime}}, giving way to {{descWeather}} with a high of {{todayHigh}} and low {{todayLow}}.{{condWarning}}{{eveningFog}}#Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}", //Weather - Morning Strings @@ -58,17 +58,17 @@ //Weather - Afternoon Strings "weat-afternoon.0": "As morning gives way to afternoon, the weather will continue to be {{descWeather}} with a high of {{todayHigh}} and low {{todayLow}}.{{condWarning}}{{eveningFog}}#Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}", "weat-afternoon.1": "The weather continues to be {{descWeather}} with a high of {{todayHigh}} and low {{todayLow}}.{{condWarning}}{{eveningFog}}#Tomorrow, expect {{tomorrowWeather}} withwith a high of {{tomorrowHigh}} and low of {{tomorrowLow}}", - "weat-afternoon.2": "The weather continues to be {{descWeather}} with a high of {{todayHigh}} and low {{todayLow}}.{{condWarning}}{{eveningFog}}#Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}", + "weat-afternoon.2": "The weather is currently {{descWeather}} with a high of {{todayHigh}} and low {{todayLow}}.{{condWarning}}{{eveningFog}}#Tomorrow, anticipate {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}", //Weather - Evening Strings "weat-evening.0": "The sun sets over the studio, bringing a close to today.#{{condString}}{{eveningFog}}Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}", - "weat-evening.1": "{{condString}}{{eveningFog}}Tomorrow, expect {{tomorrowWeather}} with high:{{tomorrowHigh}} and low:{{tomorrowLow}}", - "weat-evening.2": "{{condString}}{{eveningFog}}Tomorrow, expect {{tomorrowWeather}} with high:{{tomorrowHigh}} and low:{{tomorrowLow}}", + "weat-evening.1": "{{condString}}{{eveningFog}}Tomorrow, expect {{tomorrowWeather}} with high: {{tomorrowHigh}} and low: {{tomorrowLow}}", + "weat-evening.2": "{{condString}}{{eveningFog}}Tomorrow, anticipate {{tomorrowWeather}} with high: {{tomorrowHigh}} and low: {{tomorrowLow}}", //Weather - Night "weat-night.0": "{{condString}}{{eveningFog}Tomorrow, expect {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}.", - "weat-night.1": "{{condString}}{{eveningFog}}Tomorrow, expect {{tomorrowWeather}} with high:{{tomorrowHigh}} and low:{{tomorrowLow}}", - "weat-night.2": "{{condString}}{{eveningFog}}Tomorrow, expect {{tomorrowWeather}} with high:{{tomorrowHigh}} and low:{{tomorrowLow}}", + "weat-night.1": "{{condString}}{{eveningFog}}Tomorrow, it should be {{tomorrowWeather}} with high: {{tomorrowHigh}} and low: {{tomorrowLow}}", + "weat-night.2": "{{condString}}{{eveningFog}}For tomorrow, expect {{tomorrowWeather}} with high: {{tomorrowHigh}} and low: {{tomorrowLow}}", //Weather - Midnight "weat-midnight.0": "As the witching hour reigns, the weather for tomorrow is {{tomorrowWeather}} with a high of {{tomorrowHigh}} and low of {{tomorrowLow}}.", @@ -93,47 +93,36 @@ "weat-wedTomorrow.0": "Today, expect {{weather}} with high:{{high}} and low:{{low}}#Tommorow, for the wedding, expect {{tomorrowWeather}}", //Weather - Condition Strings - "weather-condition.heatwave.0": "RWS: A heatwave is expected for the Stardew Valley area out to Zuzu City. Please keep hydrated!", - "weather-condition.heatwave.1": "RWS: A heatwave is expected for areas bordering the Gem Sea.", - "weather-condition.heatwave.2": "RWS: A heatwave is in progress for areas bordering the Gem Sea.", + "weather-condition.heatwave.0": "RWS: A heatwave is expected for the Stardew Valley area out to Zuzu City. Please keep hydrated! ", + "weather-condition.heatwave.1": "RWS: A heatwave is expected for areas bordering the Gem Sea. ", + "weather-condition.heatwave.2": "RWS: A heatwave is in progress for areas bordering the Gem Sea. ", - "weather-condition.frost.0": "RWS: An unsesaonal frost is expected from areas south and east of Minister Valley, including Stardew Valley. Please keep bundled up!", - "weather-condition.frost.1": "RWS: A frost is expected for areas bordering the Gem Sea. Expect early crop death, as well as possible hypothermia.", - "weather-condition.frost.2": "RWS: An overnight frost is expected for areas bordering the Gem Sea.", + "weather-condition.frost.0": "RWS: An unsesaonal frost is expected from areas south and east of Minister Valley, including Stardew Valley. Please keep bundled up! ", + "weather-condition.frost.1": "RWS: A frost is expected for areas bordering the Gem Sea. Expect early crop death, as well as possible hypothermia. ", + "weather-condition.frost.2": "RWS: An overnight frost is expected for areas bordering the Gem Sea. ", - //this is the night string - "weather-condition.frost.night": "Forecasters are already seeing the temperatures dip dangerously low, and you should expect frosts outside tonight.", - "weather-condition.evenFog": "Fog is predicted this evening from {{startTime}} to {{endTime}}", - - //Basic Weather - "weather-tomorrow.sunny.0": "sun", - "weather-tomorrow.sunny.1": "clear skies", - - "weather-tomorrow.rainy.0": "rain", - "weather-tomorrow.rainy.1": "wet weather", - - "weather-tomorrow.debris.0": "wind", - "weather-tomorrow.debris.1": "gusts", - - "weather-tomorrow.storms.0": "storms", - "weather-tomorrow.storms.1": "lightning and rain", - - "weather-tomorrow.snowy.0": "snow", - "weather-tomorrow.snowy.1": "icy weather", + "weather-condition.whiteout.0": "RWS: An extreme blizzard is sweeping over the region, whiting out the region. ", + "weather-condition.whiteout.1": "RWS: A howling blizzard is expected throughout the valley. Do not travel if at all possible. ", + "weather-condition.whiteout.2": "RWS: Expect near zero visiblity outside as a blizzard passes through. ", - "weather-tomorrow.blizzard.0": "blizzards", - "weather-tomorrow.blizzard.1": "a near white out across the region", + //this is the night string + "weather-condition.frost.night": "Forecasters are already seeing the temperatures dip dangerously low, and you should expect frosts outside tonight. ", + "weather-condition.evenFog": "Fog is predicted this evening from {{startTime}} to {{endTime}}. ", //Weather Descriptions - Spring - "weat-spring.sunny.0": "a beautiful sunny day", - "weat-spring.sunny.1": "a good day to enjoy the sun on a warm spring morning", - "weat-spring.sunny.2": "it's another day for planting those gardens", + "weat-spring.sunny_daytime.0": "a beautiful sunny day", + "weat-spring.sunny_daytime.1": "a good day to enjoy the sun on a warm spring morning", + "weat-spring.sunny_daytime.2": "it's another day for planting those gardens", + + "weat-spring.sunny_nighttime.0": "a clear spring night", + "weat-spring.sunny_nighttime.1": "a cold and beautiful sky viewing night", + "weat-spring.sunny_nighttime.2": "the rest of the day in a chilly night", "weat-spring.rainy.0": "rain to fall down", "weat-spring.rainy.1": "a gentle downpour of preciptation to nourish all of those flowers", "weat-spring.rainy.2": "a good day to stay inside and read, as the rain drenches the town", - "weat-spring.stormy.0": "the spring storms are blowing off the Gem Sea, so batten those hatches", + "weat-spring.stormy.0": "the spring storms are blowing off the Gem Sea.", "weat-spring.stormy.1": "the storms blowing through the valley are expected to be all day", "weat-spring.stormy.2": "expect lightning and thunder all day", @@ -153,20 +142,24 @@ "weat-spring.drythunder.1": "due to the lack of moisture, the lightning will not include rain", "weat-spring.drythunder.2": "expect lightning and thunder but no rain", - "weat-spring.thundersnow.0": "a rare and out of season thunder snow will be in the valley" , + "weat-spring.thundersnow.0": "a rare and out of season thunder snow will be in the valley", "weat-spring.thundersnow.1": "a rare and out of season thunder snow will be in the valley", "weat-spring.thundersnow.2": "a rare and out of season thunder snow will be in the valley", //Weather Descriptions - Summer - "weat-summer.sunny.0": "a hot sunny day", - "weat-summer.sunny.1": "a good day to enjoy the sun", - "weat-summer.sunny.2": "a bright cheery day", + "weat-summer.sunny_daytime.0": "a hot sunny day", + "weat-summer.sunny_daytime.1": "a good day to enjoy the sun", + "weat-summer.sunny_daytime.2": "a bright cheery day", + + "weat-summer.sunny_nighttime.0": "a warm summer night", + "weat-summer.sunny_nighttime.1": "to enjoy a warm clear night", + "weat-summer.sunny_nighttime.2": "a great night to stargaze", "weat-summer.rainy.0": "a rain falling down", "weat-summer.rainy.1": "a rain providing a relief from the sun", "weat-summer.rainy.2": "a good day to stay inside and read, as the rain drenches the town", - "weat-summer.stormy.0": "more summer storms blowing off the Gem Sea, so batten those hatches", + "weat-summer.stormy.0": "more summer storms blowing off the Gem Sea. Make sure to batten those hatches down!", "weat-summer.stormy.1": "that the storms blowing through the valley will last all day", "weat-summer.stormy.2": "lightning and thunder all day", @@ -187,15 +180,19 @@ "weat-summer.thundersnow.2": "a rare and out of season thunder snow will be in the valley", //Weather Descriptions - Fall - "weat-fall.sunny.0": "a cool sunny day", - "weat-fall.sunny.1": "a good day to enjoy the sun on a chilly fall morning", - "weat-fall.sunny.2": "a bright cheery day", + "weat-fall.sunny_daytime.0": "a cool sunny day", + "weat-fall.sunny_daytime.1": "a good day to enjoy the sun on a chilly fall morning", + "weat-fall.sunny_daytime.2": "a bright cheery day", + + "weat-fall.sunny_nighttime.0": "a chilly clear night", + "weat-fall.sunny_nighttime.1": "a chilly night", + "weat-fall.sunny_nighttime.2": "a good night to sit out on the porch", "weat-fall.rainy.0": "a rain falling down", "weat-fall.rainy.1": "a sign of the advancing rain on the valley", "weat-fall.rainy.2": "a good day to stay inside and read, as the rain drenches the town", - "weat-fall.stormy.0": "the fall storms are blowing off the Gem Sea, so batten those hatches", + "weat-fall.stormy.0": "the fall storms are blowing off the Gem Sea", "weat-fall.stormy.1": "the storms blowing through the valley are expected to come in waves all day", "weat-fall.stormy.2": "expect lightning and thunder all day", @@ -220,9 +217,13 @@ "weat-fall.thundersnow.2": "an almost unheard of thunder snow will be in the valley", //Weather Descriptions - Winter - "weat-winter.sunny.0": "a cool sunny day", - "weat-winter.sunny.1": "a good day to enjoy the sun on a chilly winter morning", - "weat-winter.sunny.2": "a bright cheery day in that peculiar winter way", + "weat-winter.sunny_daytime.0": "a cool sunny day", + "weat-winter.sunny_daytime.1": "a good day to enjoy the sun on a chilly winter morning", + "weat-winter.sunny_daytime.2": "a bright winter cheery day", + + "weat-winter.sunny_nighttime.0": "a frigid sunny night", + "weat-winter.sunny_nighttime.1": "a good day to drink hot chocolate from inside", + "weat-winter.sunny_nighttime.2": "a frozen cloudless night", "weat-winter.rainy.0": "an unusually warm day sees rain pouring down", "weat-winter.rainy.1": "a sign of the advancing rain on the valley", @@ -271,16 +272,22 @@ //Weather Menu strings "weather-menu.opening": "This is Kylie from KZAM Radio, broadcasting on 92.5 out of Point Drake. It is the {{descDay}}, and here is the weather report for Stardew Valley:", + "weather-menu.openingS1D1": "This is Kylie from KZAM Radio, broadcasting on 92.5 out of Point Drake. It is the beginning of the year, the {{descDay}}, and here is the weather report for Stardew Valley:", + "weather-menu.openingS4D28": "This is Kylie from KZAM Radio, broadcasting on 92.5 out of Point Drake. It is the end of the year, the {{descDay}}, and here is the weather report for Stardew Valley:", "weather-menu.condition.frost": "RWS Warning: Frost tonight.", "weather-menu.condition.heatwave": "RWS Warning: Heatwave expected through the day.", - "weather-menu.current": "Current Conditions: {{todayCondition}}. High: {{todayHigh}} with Low: {{todayLow}}. {{fogString}}", - "weather-menu.fog": "Fog present until {{fogTime}}", - "weather-menu.fogFuture": "Expected fog at {{fogTime}} to {{endFog}}", + "weather-menu.current": "Current Conditions: {{todayCondition}}. High: {{todayHigh}} with Low: {{todayLow}}.{{fogString}}", + "weather-menu.fog": "Fog present until {{fogTime}}.", + "weather-menu.expectedFog": " Evening fog is expected as well.", + "weather-menu.fogFuture": " Expected fog later at about {{fogTime}} to {{endFog}}.", "weather-menu.tomorrow": "Tomorrow's Forecast: {{tomorrowCondition}}. High: {{tomorrowHigh}} with Low: {{tomorrowLow}}.", //basic conditions + "weather_sunny_daytime": "Sunny", + "weather_sunny_nighttime": "Clear", "weather_sunny": "Sunny", - "weather_wind": "Debris", + "weather_whiteout": "White Out", + "weather_wind": "Windy", "weather_lightning": "Stormy", "weather_snow": "Snowy", "weather_rainy": "Rainy", diff --git a/ClimatesOfFerngill/manifest.json b/ClimatesOfFerngill/manifest.json index 1b9981a..f7bec22 100644 --- a/ClimatesOfFerngill/manifest.json +++ b/ClimatesOfFerngill/manifest.json @@ -1,7 +1,7 @@ { "Name": "Climates of Ferngill [Rebuild]", "Author": "KoihimeNakamura", - "Version": "1.3.0-beta3", + "Version": "1.3.0", "Description": "Create a unique climate system with custom weathers, as well as add weather related events and commands.", "UniqueID": "KoihimeNakamura.ClimatesOfFerngill", "EntryDll": "ClimatesOfFerngill.dll", diff --git a/CustomizableCartRedux/CustomizableCartRedux.cs b/CustomizableCartRedux/CustomizableCartRedux.cs index 844320b..fd4fb2d 100644 --- a/CustomizableCartRedux/CustomizableCartRedux.cs +++ b/CustomizableCartRedux/CustomizableCartRedux.cs @@ -4,8 +4,11 @@ using StardewValley; using StardewModdingAPI.Events; using StardewValley.Locations; +using System.Linq; using StardewModdingAPI.Utilities; using Microsoft.Xna.Framework; +using SObject = StardewValley.Object; +using StardewValley.Objects; namespace CustomizableCartRedux { @@ -115,7 +118,7 @@ private void SetCartSpawn(object Sender, EventArgs e) new Rectangle(23 * Game1.tileSize + 85 * Game1.pixelZoom, 10 * Game1.tileSize + 26 * Game1.pixelZoom, 26 * Game1.pixelZoom, 12 * Game1.pixelZoom) }; - f.travelingMerchantStock = Utility.getTravelingMerchantStock(); + f.travelingMerchantStock = GetTravelingMerchantStock(OurConfig.AmountOfItems); foreach (Rectangle travelingMerchantBound in f.travelingMerchantBounds) { Utility.clearObjectsInArea(travelingMerchantBound, f); @@ -130,6 +133,114 @@ private void SetCartSpawn(object Sender, EventArgs e) } } + private Dictionary GetTravelingMerchantStock(int numStock) + { + Dictionary dictionary = new Dictionary(); + Random r = new Random((int)((long)Game1.uniqueIDForThisGame + (long)Game1.stats.DaysPlayed)); + for (int index1 = 0; index1 < (numStock - 2); ++index1) + { + int index2 = r.Next(2, 790); + string[] strArray; + do + { + do + { + index2 = (index2 + 1) % 790; + } + while (!Game1.objectInformation.ContainsKey(index2) || Utility.isObjectOffLimitsForSale(index2)); + strArray = Game1.objectInformation[index2].Split('/'); + } + while (!strArray[3].Contains('-') || Convert.ToInt32(strArray[1]) <= 0 || (strArray[3].Contains("-13") || strArray[3].Equals("Quest")) || (strArray[0].Equals("Weeds") || strArray[3].Contains("Minerals") || strArray[3].Contains("Arch"))); + + + dictionary.Add((Item)new SObject(index2, 1, false, -1, 0), new int[2] + { + Math.Max(r.Next(1, 11) * 100, Convert.ToInt32(strArray[1]) * r.Next(3, 6)), + r.NextDouble() < 0.1 ? 5 : 1 + }); + } + dictionary.Add((Item)GetRandomFurniture(r, (List)null, 0, 1613), new int[2] + { + r.Next(1, 11) * 250, + 1 + }); + if (Utility.getSeasonNumber(Game1.currentSeason) < 2) + dictionary.Add((Item)new SObject(347, 1, false, -1, 0), new int[2] + { + 1000, + r.NextDouble() < 0.1 ? 5 : 1 + }); + else if (r.NextDouble() < 0.4) + dictionary.Add((Item)new SObject(Vector2.Zero, 136, false), new int[2] + { + 4000, + 1 + }); + if (r.NextDouble() < 0.25) + dictionary.Add((Item)new SObject(433, 1, false, -1, 0), new int[2] + { + 2500, + 1 + }); + return dictionary; + } + + private Furniture GetRandomFurniture(Random r, List stock, int lowerIndexBound = 0, int upperIndexBound = 1462) + { + Dictionary dictionary = Game1.content.Load>("Data\\Furniture"); + int num; + do + { + num = r.Next(lowerIndexBound, upperIndexBound); + if (stock != null) + { + foreach (Item obj in stock) + { + if (obj is Furniture && obj.parentSheetIndex == num) + num = -1; + } + } + } + while (IsFurnitureOffLimitsForSale(num) || !dictionary.ContainsKey(num)); + Furniture furniture = new Furniture(num, Vector2.Zero); + int maxValue = int.MaxValue; + furniture.stack = maxValue; + return furniture; + } + + private static bool IsFurnitureOffLimitsForSale(int index) + { + switch (index) + { + case 1680: + case 1733: + case 1669: + case 1671: + case 1541: + case 1545: + case 1554: + case 1402: + case 1466: + case 1468: + case 131: + case 1226: + case 1298: + case 1299: + case 1300: + case 1301: + case 1302: + case 1303: + case 1304: + case 1305: + case 1306: + case 1307: + case 1308: + return true; + default: + return false; + } + } + private DayOfWeek GetDayOfWeek(SDate Target) { switch (Target.Day % 7) diff --git a/CustomizableCartRedux/manifest.json b/CustomizableCartRedux/manifest.json index de638d5..45269f6 100644 --- a/CustomizableCartRedux/manifest.json +++ b/CustomizableCartRedux/manifest.json @@ -4,8 +4,8 @@ "Version": { "MajorVersion": 1, "MinorVersion": 1, - "PatchVersion": 0, - "Build": "20170917" + "PatchVersion": 1, + "Build": "" }, "Description": "Allows you to alter the chances of the traveling cart appearing. Credit to Yyeahdude for the original idea.", "UniqueID": "KoihimeNakamura.CCR", diff --git a/SolarEclipseEvent/manifest.json b/SolarEclipseEvent/manifest.json index 5fc22eb..01d97bc 100644 --- a/SolarEclipseEvent/manifest.json +++ b/SolarEclipseEvent/manifest.json @@ -1,12 +1,7 @@ { "Name": "Solar Eclipse Event", "Author": "KoihimeNakamura", - "Version": { - "MajorVersion": 1, - "MinorVersion": 3, - "PatchVersion": 1, - "Build": "20180131" - }, + "Version": "1.3.1", "Description": "Adds a solar eclipse event", "UniqueID": "KoihimeNakamura.SolarEclipseEvent", "EntryDll": "SolarEclipseEvent.dll" diff --git a/TimeReminder/TimeReminder.cs b/TimeReminder/TimeReminder.cs index 7b646d9..bb71750 100644 --- a/TimeReminder/TimeReminder.cs +++ b/TimeReminder/TimeReminder.cs @@ -19,31 +19,6 @@ public override void Entry(IModHelper helper) PrevDate = DateTime.Now; GameEvents.OneSecondTick += GameEvents_OneSecondTick; - TimeEvents.AfterDayStarted += TimeEvents_AfterDayStarted; - } - - private void TimeEvents_AfterDayStarted(object sender, EventArgs e) - { - int stage = 0, daysLeft = 0; - int numCropsUnsynced = 0; - - Farm f = Game1.getFarm(); - foreach (KeyValuePair tf in f.terrainFeatures) - { - if (tf.Value is HoeDirt h && h.crop != null) - { - if (stage != h.crop.currentPhase && daysLeft != h.crop.dayOfCurrentPhase) - { - stage = h.crop.currentPhase; - daysLeft = h.crop.dayOfCurrentPhase; - numCropsUnsynced++; - } - - } - } - - numCropsUnsynced--; //subtract 1 - Game1.addHUDMessage(new HUDMessage($"We've got {numCropsUnsynced} unsync'd crops")); } private void GameEvents_OneSecondTick(object sender, EventArgs e)