Skip to content

Commit

Permalink
Add rainy weather config option (#33)
Browse files Browse the repository at this point in the history
* Update version number

* Add Config option to disable rainy day screenshots
  • Loading branch information
CompSciLauren authored Jan 27, 2020
1 parent 8277a26 commit 9293522
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions DailyScreenshot/ModConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class ModConfig
public string FolderDestinationForDailyScreenshots { get; set; }
public string FolderDestinationForKeypressScreenshots { get; set; }
public Dictionary<string, bool> HowOftenToTakeScreenshot { get; set; }
public bool TakeScreenshotOnRainyDays { get; set; }

public ModConfig()
{
Expand All @@ -22,6 +23,7 @@ public ModConfig()
TakeScreenshotKeyZoomLevel = DEFAULT_ZOOM; // zoomed out to view entire map
FolderDestinationForDailyScreenshots = DEFAULT_FOLDER;
FolderDestinationForKeypressScreenshots = DEFAULT_FOLDER;
TakeScreenshotOnRainyDays = true;

HowOftenToTakeScreenshot = new Dictionary<string, bool>
{
Expand Down
5 changes: 5 additions & 0 deletions DailyScreenshot/ModEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ private void OnUpdateTicked(object sender, UpdateTickedEventArgs e)
/// <summary>Checks whether it is the appropriate day to take a screenshot of the entire farm.</summary>
private void CheckScreenshotAction()
{
if (Config.TakeScreenshotOnRainyDays == false && (Game1.isRaining == true || Game1.isLightning == true))
{
return;
}

if (Config.HowOftenToTakeScreenshot["Daily"] == true)
{
AutoScreenshot();
Expand Down
2 changes: 1 addition & 1 deletion DailyScreenshot/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Name": "Daily Screenshot",
"Author": "CompSciLauren",
"Version": "1.1.1",
"Version": "1.2.0",
"Description": "Automatically takes a daily screenshot of your entire farm.",
"UniqueID": "CompSciLauren.DailyScreenshot",
"EntryDll": "DailyScreenshot.dll",
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![logo](FeatureImage.png)

# Daily Screenshot v1.1.1
# Daily Screenshot v1.2.0

> A Stardew Valley mod that automatically takes a screenshot of your entire farm at the start of each day.
Expand Down Expand Up @@ -43,6 +43,7 @@ Releases can be found at the following websites:
| TakeScreenshotKeyZoomLevel | Any number from 0 to 1 | 0.25 (full-map screenshot) |
| FolderDestinationForDailyScreenshots | A path to a folder on your computer (if the path you specify does not exist, it will be created) Note: Needs to have two slashes in the file path. Example: C:\\\Users\\\Lauren\\\OneDrive\\\Pictures\\\Screenshots | default (located in StardewValley\Screenshots\Your-Farm-Name-Here folder) |
| FolderDestinationForKeypressScreenshots | A path to a folder on your computer (if the path you specify does not exist, it will be created) Note: Needs to have two slashes in the file path. Example: C:\\\Users\\\Lauren\\\OneDrive\\\Pictures\\\Screenshots | default (located in StardewValley\Screenshots\Your-Farm-Name-Here folder) |
| TakeScreenshotOnRainyDays | true, false | true |
| HowOftenToTakeScreenshot | Everything described for the rest of this table | -- |
| Daily | true, false | true |
| Mondays | true, false | true |
Expand Down

0 comments on commit 9293522

Please sign in to comment.