Skip to content

Commit

Permalink
Add simple forgotten check to make sure the greenhouse is even built …
Browse files Browse the repository at this point in the history
…before sending the mail (#15)
  • Loading branch information
Bpendragon authored Mar 24, 2024
1 parent 6e48dff commit c697c59
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!-- TOC -->

- [v3.0.1](#v301)
- [v3.0.0 - SDV 1.6/SMAPI 4.0 Update](#v300---sdv-16smapi-40-update)
- [v2.1.1](#v211)
- [v2.1.0](#v210)
Expand All @@ -19,6 +20,9 @@

<!-- /TOC -->

## v3.0.1
* Add simple forgotten check that the greenhouse is even built before sending the Wizard mail.

## v3.0.0 - SDV 1.6/SMAPI 4.0 Update
* Rewrote 60%+ of the mod
* Now Compatible with SDV 1.6 (and incompatible with SDV 1.5 or lower)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ internal void OnDayEnding(object sender, DayEndingEventArgs e)
{
var gh = Game1.getFarm().buildings.OfType<GreenhouseBuilding>().FirstOrDefault();
Monitor.Log($"OnDayEnding hit. Greenhouse Level {GetUpgradeLevel(gh)}");
if(!(Game1.player.hasOrWillReceiveMail("ccPantry") || Game1.player.hasOrWillReceiveMail("jojaPantry")))
{
Monitor.Log("Player has not unlocked the Greenhouse, further checks skipped");
return;
}
AddLetterIfNeeded(GetUpgradeLevel(gh));

if (gh.buildingType.Value.StartsWith("GreenhouseSprinklers"))
Expand Down
2 changes: 1 addition & 1 deletion GreenhouseSprinklers/GreenhouseSprinklers/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Name": "Greenhouse Sprinklers",
"Author": "Bpendragon",
"Version": "3.0.0",
"Version": "3.0.1",
"Description": "Pay Robin off to add automatic sprinklers to the greenhouse, allowing 100% utilization",
"UniqueID": "Bpendragon.GreenhouseSprinklers",
"EntryDll": "GreenhouseSprinklers.dll",
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2021 David Camp (Bpendragon)
Copyright (c) 2019-2024 David Camp (Bpendragon)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit c697c59

Please sign in to comment.