Bug fix in read tile

master
Mohammad Shoaib 2022-04-15 16:02:24 +05:30
parent c3882e7ea9
commit d9bb4aac35
1 changed files with 10 additions and 1 deletions
stardew-access/Features

View File

@ -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";