Skip to content

Commit

Permalink
Added watered status onto UI when crop is hovered
Browse files Browse the repository at this point in the history
Added localization entries to indicate watering status to default.json and used the CropRender function to add the watering status of a crop using hoeDirt.state.value == 1. Works well in actual gameplay on all farmland and garden pots.
  • Loading branch information
Dylan5198 committed Jul 2, 2024
1 parent 3aa1043 commit 9197924
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions UIInfoSuite2/UIElements/ShowCropAndBarrelTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ public static bool CropRender(TerrainFeature? terrain, List<string> entries)
string cropName = DropsHelper.GetCropHarvestName(crop);
string daysLeftStr = daysLeft <= 0 ? I18n.ReadyToHarvest() : $"{daysLeft} {I18n.Days()}";
entries.Add($"{cropName}: {daysLeftStr}");

string waterStatus = hoeDirt.state.Value == 1 ? I18n.Watered() : I18n.NotWatered();
entries.Add(waterStatus);

if (!string.IsNullOrEmpty(fertilizerStr))
{
fertilizerStr = $"({I18n.With()} {fertilizerStr})";
Expand Down
2 changes: 2 additions & 0 deletions UIInfoSuite2/i18n/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"ReadyToHarvest": "Ready to harvest!",
"With": "with",
"Fertilized": "fertilized",
"Watered": "Watered",
"NotWatered": "Not Watered",
"DoesNotProduceThisSeason": "Does not produce this season",
//Tree
"Stump": "stump",
Expand Down

0 comments on commit 9197924

Please sign in to comment.