From d9bb4aac35391caa81c0234a61632f1592713d99 Mon Sep 17 00:00:00 2001 From: Mohammad Shoaib Date: Fri, 15 Apr 2022 16:02:24 +0530 Subject: [PATCH] Bug fix in read tile --- stardew-access/Features/TileInfo.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/stardew-access/Features/TileInfo.cs b/stardew-access/Features/TileInfo.cs index 0f29516..3863cfc 100644 --- a/stardew-access/Features/TileInfo.cs +++ b/stardew-access/Features/TileInfo.cs @@ -355,7 +355,7 @@ namespace stardew_access.Features { category = CATEGORY.Crops; HoeDirt dirt = (HoeDirt)terrain.Get(); - if (dirt.crop != null) + if (dirt.crop != null && !dirt.crop.forageCrop.Value) { string cropName = Game1.objectInformation[dirt.crop.indexOfHarvest.Value].Split('/')[0]; toReturn = $"{cropName}"; @@ -373,6 +373,15 @@ namespace stardew_access.Features if (isHarvestable) toReturn = "Harvestable " + toReturn; } + else if (dirt.crop != null && dirt.crop.forageCrop.Value) + { + toReturn = dirt.crop.whichForageCrop.Value switch + { + 1 => "Spring onion", + 2 => "Ginger", + _ => "Forageable crop" + }; + } else { toReturn = "Soil";