From 9197924a5f0a7fb6dc985e7c3b2a032a01768a17 Mon Sep 17 00:00:00 2001 From: Dylan5198 Date: Tue, 2 Jul 2024 17:09:34 -0230 Subject: [PATCH] Added watered status onto UI when crop is hovered 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. --- UIInfoSuite2/UIElements/ShowCropAndBarrelTime.cs | 4 ++++ UIInfoSuite2/i18n/default.json | 2 ++ 2 files changed, 6 insertions(+) diff --git a/UIInfoSuite2/UIElements/ShowCropAndBarrelTime.cs b/UIInfoSuite2/UIElements/ShowCropAndBarrelTime.cs index 1ae6610e..4ec5dca5 100644 --- a/UIInfoSuite2/UIElements/ShowCropAndBarrelTime.cs +++ b/UIInfoSuite2/UIElements/ShowCropAndBarrelTime.cs @@ -432,6 +432,10 @@ public static bool CropRender(TerrainFeature? terrain, List 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})"; diff --git a/UIInfoSuite2/i18n/default.json b/UIInfoSuite2/i18n/default.json index f40142da..ddd298f4 100644 --- a/UIInfoSuite2/i18n/default.json +++ b/UIInfoSuite2/i18n/default.json @@ -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",