Fixed calendar spelling, updated more rain, retired some mods, and updated more mods to be 1.4 compatible. Starded touching up StardewSymphony.

This commit is contained in:
JoshuaNavarro 2019-11-29 14:22:20 -08:00
parent d77df1f88c
commit 3ce3f57220
167 changed files with 601 additions and 192 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -1,3 +1,7 @@
using System;
using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Omegasis.BillboardAnywhere.Framework;
using StardewModdingAPI;
using StardewModdingAPI.Events;
@ -15,6 +19,23 @@ namespace Omegasis.BillboardAnywhere
/// <summary>The mod configuration.</summary>
private ModConfig Config;
/// <summary>
/// The texture for the calendar button.
/// </summary>
private Texture2D calendarTexture;
/// <summary>
/// The texture for the quest button.
/// </summary>
private Texture2D questTexture;
/// <summary>
/// The button for the calendar menu.
/// </summary>
public ClickableTextureComponent billboardButton;
/// <summary>
/// The button for the quest menu.
/// </summary>
public ClickableTextureComponent questButton;
/*********
** Public methods
@ -25,9 +46,24 @@ namespace Omegasis.BillboardAnywhere
{
this.Config = helper.ReadConfig<ModConfig>();
helper.ConsoleCommands.Add("Omegasis.BillboardAnywhere.ReloadConfig", "Reloads the config file for BillboardAnywhere to reposition the button for the inventory menu page.", this.reloadConfig);
helper.ConsoleCommands.Add("Omegasis.BillboardAnywhere.SetcalendarButtonX", "<int>Sets the x position for the calendar button in the game menu.", this.setcalendarButtonX);
helper.ConsoleCommands.Add("Omegasis.BillboardAnywhere.SetcalendarButtonY", "<int> Sets the y position for the calendar button in the game menu.", this.setcalendarButtonY);
helper.ConsoleCommands.Add("Omegasis.BillboardAnywhere.SetcalendarButtonPosition", "<int,int> Sets the position for the calendar button in the game menu.", this.setcalendarButtonPosition);
helper.ConsoleCommands.Add("Omegasis.BillboardAnywhere.SetQuestButtonX", "<int>Sets the x position for the quest button in the game menu.", this.setQuestButtonX);
helper.ConsoleCommands.Add("Omegasis.BillboardAnywhere.SetQuestButtonY", "<int> Sets the y position for the quest button in the game menu.", this.setQuestButtonX);
helper.ConsoleCommands.Add("Omegasis.BillboardAnywhere.SetQuestButtonPosition", "<int,int> Sets the position for the quest button in the game menu.", this.setQuestButtonPosition);
helper.ConsoleCommands.Add("Omegasis.BillboardAnywhere.SetcalendarButtonVisibility", "<bool> Sets the visibility for the billboard button in the game menu.", this.setcalendarButtonVisibility);
helper.ConsoleCommands.Add("Omegasis.BillboardAnywhere.SetQuestButtonVisibility", "<bool> Sets the visibility for the quest button in the game menu.", this.setQuestButtonVisibility);
helper.Events.Input.ButtonPressed += this.OnButtonPressed;
}
helper.Events.Display.RenderedActiveMenu += this.RenderBillboardMenuButton;
helper.Events.Input.ButtonPressed += this.Input_ButtonPressed;
this.calendarTexture = helper.Content.Load<Texture2D>(Path.Combine("Assets", "Billboard.png"));
this.questTexture= helper.Content.Load<Texture2D>(Path.Combine("Assets", "Quest.png"));
this.billboardButton = new ClickableTextureComponent(new Rectangle((int)this.Config.CalendarOffsetFromMenu.X, (int)this.Config.CalendarOffsetFromMenu.Y, this.calendarTexture.Width, this.calendarTexture.Height), this.calendarTexture, new Rectangle(0, 0, this.calendarTexture.Width, this.calendarTexture.Height), 1f, false);
this.questButton = new ClickableTextureComponent(new Rectangle((int)this.Config.QuestOffsetFromMenu.X, (int)this.Config.QuestOffsetFromMenu.Y, this.questTexture.Width, this.questTexture.Height), this.questTexture, new Rectangle(0, 0, this.questTexture.Width, this.questTexture.Height), 1f, false);
}
/*********
** Private methods
@ -38,8 +74,214 @@ namespace Omegasis.BillboardAnywhere
public void OnButtonPressed(object sender, ButtonPressedEventArgs e)
{
// load menu if key pressed
if (Context.IsPlayerFree && e.Button == this.Config.KeyBinding)
if (Context.IsPlayerFree && e.Button == this.Config.CalendarKeyBinding)
Game1.activeClickableMenu = new Billboard();
if (Context.IsPlayerFree && e.Button == this.Config.QuestBoardKeyBinding)
{
Game1.RefreshQuestOfTheDay();
Game1.activeClickableMenu = new Billboard(true);
}
}
/// <summary>
/// Checks to see if the billboard button is clicked.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Input_ButtonPressed(object sender, ButtonPressedEventArgs e)
{
if (Game1.activeClickableMenu == null) return;
if (e.Button == SButton.MouseLeft)
{
if (this.isInventoryPage())
{
if (this.billboardButton.containsPoint(Game1.getMousePosition().X, Game1.getMousePosition().Y))
{
if (this.Config.EnableInventoryCalendarButton == false) return;
Game1.activeClickableMenu = new Billboard(false);
}
if (this.questButton.containsPoint(Game1.getMousePosition().X, Game1.getMousePosition().Y))
{
if (this.Config.EnableInventoryQuestButton == false) return;
Game1.activeClickableMenu = new Billboard(true);
}
}
}
}
/// <summary>
/// Renders the billboard button to the menu.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void RenderBillboardMenuButton(object sender, RenderedActiveMenuEventArgs e)
{
if (this.isInventoryPage())
{
this.billboardButton.bounds = new Rectangle(Game1.activeClickableMenu.xPositionOnScreen + (int)this.Config.CalendarOffsetFromMenu.X, Game1.activeClickableMenu.yPositionOnScreen + (int)this.Config.CalendarOffsetFromMenu.Y, this.calendarTexture.Width, this.calendarTexture.Height);
this.questButton.bounds = new Rectangle(Game1.activeClickableMenu.xPositionOnScreen + (int)this.Config.QuestOffsetFromMenu.X, Game1.activeClickableMenu.yPositionOnScreen + (int)this.Config.QuestOffsetFromMenu.Y, this.calendarTexture.Width, this.calendarTexture.Height);
if(this.Config.EnableInventoryQuestButton) this.questButton.draw(Game1.spriteBatch);
if (this.Config.EnableInventoryCalendarButton) this.billboardButton.draw(Game1.spriteBatch);
GameMenu activeMenu = (Game1.activeClickableMenu as GameMenu);
activeMenu.drawMouse(Game1.spriteBatch);
if (this.billboardButton.containsPoint(Game1.getMousePosition().X, Game1.getMousePosition().Y))
{
//My deepest appologies for not being able to personally translate more text.
if (Game1.content.GetCurrentLanguage() == LocalizedContentManager.LanguageCode.en)
{
if (this.Config.EnableInventoryCalendarButton == false) return;
IClickableMenu.drawHoverText(Game1.spriteBatch, "Open Billboard Menu", Game1.smallFont);
}
}
if (this.questButton.containsPoint(Game1.getMousePosition().X, Game1.getMousePosition().Y))
{
//My deepest appologies once again for not being able to personally translate more text.
if (Game1.content.GetCurrentLanguage() == LocalizedContentManager.LanguageCode.en)
{
if (this.Config.EnableInventoryQuestButton == false) return;
IClickableMenu.drawHoverText(Game1.spriteBatch, "Open Quest Menu", Game1.smallFont);
}
}
}
}
/// <summary>
/// Checks to see if the current active menu is the game menu and the current page is the inventory page.
/// </summary>
/// <returns></returns>
private bool isInventoryPage()
{
if (Game1.activeClickableMenu == null) return false;
if (Game1.activeClickableMenu is StardewValley.Menus.GameMenu)
{
GameMenu activeMenu = (Game1.activeClickableMenu as GameMenu);
IClickableMenu currentTab = activeMenu.GetCurrentPage();
if (currentTab is InventoryPage)
{
return true;
}
}
return false;
}
/// <summary>
/// Reloads the mod's config and repositions the menu button as necessary.
/// </summary>
private void reloadConfig(string Name, string[] Params)
{
this.Config = this.Helper.ReadConfig<ModConfig>();
this.billboardButton = new ClickableTextureComponent(new Rectangle((int)this.Config.CalendarOffsetFromMenu.X, (int)this.Config.CalendarOffsetFromMenu.Y, this.calendarTexture.Width, this.calendarTexture.Height), this.calendarTexture, new Rectangle(0, 0, this.calendarTexture.Width, this.calendarTexture.Height), 1f, false);
this.questButton = new ClickableTextureComponent(new Rectangle((int)this.Config.QuestOffsetFromMenu.X, (int)this.Config.QuestOffsetFromMenu.Y, this.questTexture.Width, this.questTexture.Height), this.questTexture, new Rectangle(0, 0, this.questTexture.Width, this.questTexture.Height), 1f, false);
}
/// <summary>
/// Reloads the mod's config and repositions the menu button as necessary.
/// </summary>
private void reloadConfig()
{
this.Config = this.Helper.ReadConfig<ModConfig>();
this.billboardButton = new ClickableTextureComponent(new Rectangle((int)this.Config.CalendarOffsetFromMenu.X, (int)this.Config.CalendarOffsetFromMenu.Y, this.calendarTexture.Width, this.calendarTexture.Height), this.calendarTexture, new Rectangle(0, 0, this.calendarTexture.Width, this.calendarTexture.Height), 1f, false);
this.questButton = new ClickableTextureComponent(new Rectangle((int)this.Config.QuestOffsetFromMenu.X, (int)this.Config.QuestOffsetFromMenu.Y, this.questTexture.Width, this.questTexture.Height), this.questTexture, new Rectangle(0, 0, this.questTexture.Width, this.questTexture.Height), 1f, false);
}
/// <summary>
/// Sets the x position of the menu button.
/// </summary>
/// <param name="Name">The name of the command.</param>
/// <param name="Params">The parameters passed into the command.</param>
private void setcalendarButtonX(string Name, string[] Params)
{
this.Config.CalendarOffsetFromMenu = new Vector2(Convert.ToInt32(Params[0]), this.Config.CalendarOffsetFromMenu.Y);
this.Helper.WriteConfig<ModConfig>(this.Config);
this.reloadConfig();
}
/// <summary>
/// Sets the y position of the menu button.
/// </summary>
/// <param name="Name">The name of the command.</param>
/// <param name="Params">The parameters passed into the command.</param>
private void setcalendarButtonY(string Name, string[] Params)
{
this.Config.CalendarOffsetFromMenu = new Vector2(this.Config.CalendarOffsetFromMenu.X, Convert.ToInt32(Params[0]));
this.Helper.WriteConfig<ModConfig>(this.Config);
this.reloadConfig();
}
/// <summary>
/// Sets the position of the menu button.
/// </summary>
/// <param name="Name">The name of the command.</param>
/// <param name="Params">The parameters passed into the command.</param>
private void setcalendarButtonPosition(string Name, string[] Params)
{
this.Config.CalendarOffsetFromMenu = new Vector2(Convert.ToInt32(Params[0]), Convert.ToInt32(Params[1]));
this.Helper.WriteConfig<ModConfig>(this.Config);
this.reloadConfig();
}
/// <summary>
/// Sets the x position of the quest menu button.
/// </summary>
/// <param name="Name">The name of the command.</param>
/// <param name="Params">The parameters passed into the command.</param>
private void setQuestButtonX(string Name, string[] Params)
{
this.Config.QuestOffsetFromMenu = new Vector2(Convert.ToInt32(Params[0]), this.Config.QuestOffsetFromMenu.Y);
this.Helper.WriteConfig<ModConfig>(this.Config);
this.reloadConfig();
}
/// <summary>
/// Sets the y position of the quest menu button.
/// </summary>
/// <param name="Name">The name of the command.</param>
/// <param name="Params">The parameters passed into the command.</param>
private void setQuestButtonY(string Name, string[] Params)
{
this.Config.QuestOffsetFromMenu = new Vector2(this.Config.QuestOffsetFromMenu.X, Convert.ToInt32(Params[0]));
this.Helper.WriteConfig<ModConfig>(this.Config);
this.reloadConfig();
}
/// <summary>
/// Sets the position of the quest menu button.
/// </summary>
/// <param name="Name">The name of the command.</param>
/// <param name="Params">The parameters passed into the command.</param>
private void setQuestButtonPosition(string Name, string[] Params)
{
this.Config.QuestOffsetFromMenu = new Vector2(Convert.ToInt32(Params[0]), Convert.ToInt32(Params[1]));
this.Helper.WriteConfig<ModConfig>(this.Config);
this.reloadConfig();
}
/// <summary>
/// Sets the visibility and functionality of the billboard menu button.
/// </summary>
/// <param name="Name">The name of the command.</param>
/// <param name="Params">The parameters passed into the command.</param>
private void setcalendarButtonVisibility(string Name, string[] Params)
{
this.Config.EnableInventoryCalendarButton = Convert.ToBoolean(Params[0]);
this.Helper.WriteConfig<ModConfig>(this.Config);
this.reloadConfig();
}
/// <summary>
/// Sets the visibility and functionality of the quest menu button.
/// </summary>
/// <param name="Name">The name of the command.</param>
/// <param name="Params">The parameters passed into the command.</param>
private void setQuestButtonVisibility(string Name, string[] Params)
{
this.Config.EnableInventoryQuestButton = Convert.ToBoolean(Params[0]);
this.Helper.WriteConfig<ModConfig>(this.Config);
this.reloadConfig();
}
}
}

View File

@ -86,6 +86,14 @@
<ItemGroup>
<None Include="README.md" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\Billboard.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Quest.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\deploy.targets" />
</Project>

View File

@ -1,3 +1,4 @@
using Microsoft.Xna.Framework;
using StardewModdingAPI;
namespace Omegasis.BillboardAnywhere.Framework
@ -6,6 +7,21 @@ namespace Omegasis.BillboardAnywhere.Framework
internal class ModConfig
{
/// <summary>The key which shows the billboard menu.</summary>
public SButton KeyBinding { get; set; } = SButton.B;
public SButton CalendarKeyBinding { get; set; } = SButton.B;
/// <summary>The key which shows the quest menu.</summary>
public SButton QuestBoardKeyBinding { get; set; } = SButton.H;
/// <summary>The offset for the calendar button from the active menu</summary>
public Vector2 CalendarOffsetFromMenu { get; set; } = new Vector2(-100, 0);
/// <summary>The offset for the quest button from the active menu</summary>
public Vector2 QuestOffsetFromMenu { get; set; } = new Vector2(-200, 0);
/// <summary>
/// If true the calendar button is enabled for the in-game menu.
/// </summary>
public bool EnableInventoryCalendarButton { get; set; } = true;
/// <summary>
/// If true the quest button is enabled for the in-game menu.
/// </summary>
public bool EnableInventoryQuestButton { get; set; } = true;
}
}

View File

@ -1,10 +1,10 @@
{
"Name": "Billboard Anywhere",
"Author": "Alpha_Omegasis",
"Version": "1.8.0",
"Version": "1.10.1",
"Description": "Lets you view the billboard from anywhere.",
"UniqueID": "Omegasis.BillboardAnywhere",
"EntryDll": "BillboardAnywhere.dll",
"MinimumApiVersion": "2.10.1",
"MinimumApiVersion": "3.0.0",
"UpdateKeys": [ "Nexus:492" ]
}

View File

@ -158,7 +158,7 @@ namespace Omegasis.BuildEndurance
if (this.PlayerData.CurrentLevel < this.Config.MaxLevel)
{
while (this.PlayerData.CurrentExp >= this.PlayerData.ExpToNextLevel)
while (this.PlayerData.CurrentExp >= this.PlayerData.ExpToNextLevel && this.PlayerData.CurrentLevel<this.Config.MaxLevel)
{
this.PlayerData.CurrentLevel += 1;
this.PlayerData.CurrentExp = this.PlayerData.CurrentExp - this.PlayerData.ExpToNextLevel;

View File

@ -1,10 +1,10 @@
{
"Name": "Build Endurance",
"Author": "Alpha_Omegasis",
"Version": "1.8.0",
"Version": "1.8.2",
"Description": "Increase your health as you play.",
"UniqueID": "Omegasis.BuildEndurance",
"EntryDll": "BuildEndurance.dll",
"MinimumApiVersion": "2.10.1",
"MinimumApiVersion": "3.0.0",
"UpdateKeys": [ "Nexus:445" ]
}

View File

@ -149,7 +149,7 @@ namespace Omegasis.BuildHealth
if (this.PlayerData.CurrentLevel < this.Config.MaxLevel)
{
while (this.PlayerData.CurrentExp >= this.PlayerData.ExpToNextLevel)
while (this.PlayerData.CurrentExp >= this.PlayerData.ExpToNextLevel && this.PlayerData.CurrentLevel<this.Config.MaxLevel)
{
this.PlayerData.CurrentLevel += 1;
this.PlayerData.CurrentExp = this.PlayerData.CurrentExp - this.PlayerData.ExpToNextLevel;

View File

@ -1,10 +1,10 @@
{
"Name": "Build Health",
"Author": "Alpha_Omegasis",
"Version": "1.8.0",
"Version": "1.8.1",
"Description": "Increase your health as you play.",
"UniqueID": "Omegasis.BuildHealth",
"EntryDll": "BuildHealth.dll",
"MinimumApiVersion": "2.10.1",
"MinimumApiVersion": "3.0.0",
"UpdateKeys": [ "Nexus:446" ]
}

View File

@ -92,8 +92,8 @@ namespace Omegasis.BuyBackCollectables.Framework
this.Collections.Add(BuyBackMenu.MineralsTab, new List<List<ClickableTextureComponent>>());
this.SideTabs.Add(new ClickableTextureComponent("", new Rectangle(this.xPositionOnScreen - Game1.tileSize * 3 / 4, this.yPositionOnScreen + Game1.tileSize * 6, Game1.tileSize, Game1.tileSize), "", Game1.content.LoadString("Strings\\UI:Collections_Cooking"), Game1.mouseCursors, new Rectangle(688, 64, 16, 16), Game1.pixelZoom));
this.Collections.Add(BuyBackMenu.CookingTab, new List<List<ClickableTextureComponent>>());
this.SideTabs.Add(new ClickableTextureComponent("", new Rectangle(this.xPositionOnScreen - Game1.tileSize * 3 / 4, this.yPositionOnScreen + Game1.tileSize * 7, Game1.tileSize, Game1.tileSize), "", Game1.content.LoadString("Strings\\UI:Collections_Achievements"), Game1.mouseCursors, new Rectangle(656, 80, 16, 16), Game1.pixelZoom));
this.Collections.Add(BuyBackMenu.AchievementsTab, new List<List<ClickableTextureComponent>>());
//this.SideTabs.Add(new ClickableTextureComponent("", new Rectangle(this.xPositionOnScreen - Game1.tileSize * 3 / 4, this.yPositionOnScreen + Game1.tileSize * 7, Game1.tileSize, Game1.tileSize), "", Game1.content.LoadString("Strings\\UI:Collections_Achievements"), Game1.mouseCursors, new Rectangle(656, 80, 16, 16), Game1.pixelZoom));
//this.Collections.Add(BuyBackMenu.AchievementsTab, new List<List<ClickableTextureComponent>>());
this.BackButton = new ClickableTextureComponent(new Rectangle(this.xPositionOnScreen + Game1.tileSize * 3 / 4, this.yPositionOnScreen + this.height - 20 * Game1.pixelZoom, 12 * Game1.pixelZoom, 11 * Game1.pixelZoom), Game1.mouseCursors, new Rectangle(352, 495, 12, 11), Game1.pixelZoom);
this.ForwardButton = new ClickableTextureComponent(new Rectangle(this.xPositionOnScreen + this.width - Game1.tileSize / 2 - 15 * Game1.pixelZoom, this.yPositionOnScreen + this.height - 20 * Game1.pixelZoom, 12 * Game1.pixelZoom, 11 * Game1.pixelZoom), Game1.mouseCursors, new Rectangle(365, 495, 12, 11), Game1.pixelZoom);
int[] array = new int[this.SideTabs.Count];
@ -155,8 +155,9 @@ namespace Omegasis.BuyBackCollectables.Framework
this.Collections[selectedTab].Last().Add(new ClickableTextureComponent(entry.Key + " " + drawShadow, new Rectangle(x2, num5, Game1.tileSize, Game1.tileSize), null, "", Game1.objectSpriteSheet, Game1.getSourceRectForStandardTileSheet(Game1.objectSpriteSheet, entry.Key, 16, 16), Game1.pixelZoom, drawShadow));
array[selectedTab]++;
}
if (this.Collections[5].Count == 0)
this.Collections[5].Add(new List<ClickableTextureComponent>());
/*
//if (this.Collections[5].Count == 0)
//this.Collections[5].Add(new List<ClickableTextureComponent>());
foreach (KeyValuePair<int, string> current2 in Game1.achievements)
{
bool flag = Game1.player.achievements.Contains(current2.Key);
@ -169,6 +170,7 @@ namespace Omegasis.BuyBackCollectables.Framework
array[5]++;
}
}
*/
}
@ -221,9 +223,9 @@ namespace Omegasis.BuyBackCollectables.Framework
}
foreach (ClickableTextureComponent current2 in this.Collections[this.CurrentTab][this.CurrentPage])
{
if (current2.containsPoint(x, y) && this.NewItem != null && Game1.player.money >= this.Value)
if (current2.containsPoint(x, y) && this.NewItem != null && Game1.player.Money >= this.Value)
{
Game1.player.money -= this.Value;
Game1.player.Money -= this.Value;
Game1.playSound("coin");
Game1.player.addItemByMenuIfNecessary(this.NewItem);
}
@ -236,9 +238,9 @@ namespace Omegasis.BuyBackCollectables.Framework
/// <param name="playSound">Whether to enable sound.</param>
public override void receiveRightClick(int x, int y, bool playSound = true)
{
if (this.NewItem != null && Game1.player.money >= this.Value)
if (this.NewItem != null && Game1.player.Money >= this.Value)
{
Game1.player.money -= this.Value;
Game1.player.Money -= this.Value;
Game1.player.addItemByMenuIfNecessary(this.NewItem);
Game1.playSound("coin");
}

View File

@ -1,10 +1,10 @@
{
"Name": "Buy Back Collectables",
"Author": "Alpha_Omegasis",
"Version": "1.7.0",
"Version": "1.8.0",
"Description": "Lets you buy back any obtained collectable.",
"UniqueID": "Omegasis.BuyBackCollectables",
"EntryDll": "BuyBackCollectables.dll",
"MinimumApiVersion": "2.10.1",
"MinimumApiVersion": "3.0.0",
"UpdateKeys": [ "Nexus:507" ]
}

View File

@ -1,7 +1,7 @@
{
"Name": "Fall 28 Snow Day",
"Author": "Alpha_Omegasis",
"Version": "1.7.0",
"Version": "1.7.1",
"Description": "Makes it snow on Fall 28, which makes a good explanation for all the snow on the next day.",
"UniqueID": "Omegasis.Fall28SnowDay",
"EntryDll": "Fall28SnowDay.dll",

View File

@ -9,21 +9,65 @@ namespace Omegasis.MoreRain.Framework
/// <summary>The chance out of 100 that it will storm tomorrow if it's spring.</summary>
public int SpringThunderChance { get; set; } = 5;
/// <summary>
/// Changes the mod's logic to prioritize setting a thunderstorm before checking for just a normal rainy day.
/// False = The mod will try to set a normal rainy day first.
/// True = The mod will try to set a thunderstorm (stormy) day first.
/// Default:False
/// </summary>
public bool PrioritizeSpringStorms { get; set; } = false;
/// <summary>The chance out of 100 that it will rain tomorrow if it's summer.</summary>
public int SummerRainChance { get; set; } = 5;
/// <summary>The chance out of 100 that it will storm tomorrow if it's summer.</summary>
public int SummerThunderChance { get; set; } = 10;
/// <summary>
/// Changes the mod's logic to prioritize setting a thunderstorm before checking for just a normal rainy day.
/// False = The mod will try to set a normal rainy day first.
/// True = The mod will try to set a thunderstorm (stormy) day first.
/// Default:True
/// </summary>
public bool PrioritizeSummerStorms { get; set; } = true;
/// <summary>The chance out of 100 that it will rain tomorrow if it's fall.</summary>
public int FallRainChance { get; set; } = 15;
/// <summary>The chance out of 100 that it will storm tomorrow if it's fall.</summary>
public int FallThunderChance { get; set; } = 5;
/// <summary>
/// Changes the mod's logic to prioritize setting a thunderstorm before checking for just a normal rainy day.
/// False = The mod will try to set a normal rainy day first.
/// True = The mod will try to set a thunderstorm (stormy) day first.
/// Default:False
/// </summary>
public bool PrioritizeFallStorms { get; set; } = false;
/// <summary>
/// If set to true the mod will try to make it snow in fall just for fun.
/// </summary>
public bool SnowInFall { get; set; } = false;
/// <summary>
/// The chance amouunt for it to snow in the fall.
/// </summary>
public int FallSnowChance { get; set; } = 5;
/// <summary>The chance out of 100 that it will snow tomorrow if it's winter.</summary>
public int WinterSnowChance { get; set; } = 15;
/// <summary>
/// If set to true then the mod will check to set rainy days in the winter. Default: False
/// </summary>
public bool RainInWinter { get; set; } = false;
/// <summary>
/// The chance that it will rain on a winter day. Only checked if the RainInWinter config option is true.
/// </summary>
public int WinterRainChance { get; set; } = 10;
/// <summary>Whether to suppress verbose logging.</summary>
public bool SuppressLog { get; set; } = true;
}

View File

@ -75,6 +75,23 @@ namespace Omegasis.MoreRain
{
case "spring":
// set rain
if (this.Config.PrioritizeSpringStorms)
{
if (chance <= this.Config.SpringThunderChance)
{
Game1.weatherForTomorrow = Game1.weather_lightning;
this.VerboseLog("It will be stormy tomorrow.");
return;
}
if (chance <= this.Config.SpringRainChance)
{
Game1.weatherForTomorrow = Game1.weather_rain;
this.VerboseLog("It will rain tomorrow.");
return;
}
}
else
{
if (chance <= this.Config.SpringRainChance)
{
Game1.weatherForTomorrow = Game1.weather_rain;
@ -88,29 +105,66 @@ namespace Omegasis.MoreRain
this.VerboseLog("It will be stormy tomorrow.");
return;
}
}
break;
case "summer":
// set rain
if (chance <= this.Config.SummerRainChance)
if (this.Config.PrioritizeSummerStorms)
{
Game1.weatherForTomorrow = Game1.weather_rain;
this.VerboseLog("It will rain tomorrow.");
return;
}
if (chance <= this.Config.SummerThunderChance)
{
Game1.weatherForTomorrow = Game1.weather_lightning;
this.VerboseLog("It will be stormy tomorrow.");
return;
}
if (chance <= this.Config.SummerRainChance)
{
Game1.weatherForTomorrow = Game1.weather_rain;
this.VerboseLog("It will rain tomorrow.");
return;
}
}
else
{
if (chance <= this.Config.SummerRainChance)
{
Game1.weatherForTomorrow = Game1.weather_rain;
this.VerboseLog("It will rain tomorrow.");
return;
}
if (chance <= this.Config.SummerThunderChance)
{
Game1.weatherForTomorrow = Game1.weather_lightning;
this.VerboseLog("It will be stormy tomorrow.");
return;
}
}
break;
case "fall":
case "autumn":
// set rain
if (this.Config.PrioritizeFallStorms)
{
if (chance <= this.Config.FallThunderChance)
{
Game1.weatherForTomorrow = Game1.weather_lightning;
this.VerboseLog("It will be stormy tomorrow.");
return;
}
if (this.Config.SnowInFall)
{
if (chance <= this.Config.FallSnowChance)
{
Game1.weatherForTomorrow = Game1.weather_snow;
this.VerboseLog("It will snow tomorrow.");
}
}
if (chance <= this.Config.FallRainChance)
{
Game1.weatherForTomorrow = Game1.weather_rain;
@ -118,12 +172,33 @@ namespace Omegasis.MoreRain
return;
}
}
else
{
if (chance <= this.Config.FallRainChance)
{
Game1.weatherForTomorrow = Game1.weather_rain;
this.VerboseLog("It will rain tomorrow.");
return;
}
if (this.Config.SnowInFall)
{
if (chance <= this.Config.FallSnowChance)
{
Game1.weatherForTomorrow = Game1.weather_snow;
this.VerboseLog("It will snow tomorrow.");
}
}
if (chance <= this.Config.FallThunderChance)
{
Game1.weatherForTomorrow = Game1.weather_lightning;
this.VerboseLog("It will be stormy tomorrow.");
return;
}
}
break;
case "winter":
@ -133,10 +208,13 @@ namespace Omegasis.MoreRain
Game1.weatherForTomorrow = Game1.weather_snow;
this.VerboseLog("It will snow tomorrow.");
}
else
if (this.Config.RainInWinter)
{
//StardewValley.Game1.weatherForTomorrow = StardewValley.Game1.weather_sunny;
this.VerboseLog("It will not snow tomorrow.");
if (chance <= this.Config.WinterRainChance)
{
Game1.weatherForTomorrow = Game1.weather_rain;
this.VerboseLog("It will snow tomorrow.");
}
}
break;
}

View File

@ -1,7 +1,7 @@
{
"Name": "More Rain",
"Author": "Alpha_Omegasis",
"Version": "1.8.0",
"Version": "1.9.0",
"Description": "Change how much it rains in the game.",
"UniqueID": "Omegasis.MoreRain",
"EntryDll": "MoreRain.dll",

Some files were not shown because too many files have changed in this diff Show More