Bug fix in read tile
This commit is contained in:
@@ -355,7 +355,7 @@ namespace stardew_access.Features
|
|||||||
{
|
{
|
||||||
category = CATEGORY.Crops;
|
category = CATEGORY.Crops;
|
||||||
HoeDirt dirt = (HoeDirt)terrain.Get();
|
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];
|
string cropName = Game1.objectInformation[dirt.crop.indexOfHarvest.Value].Split('/')[0];
|
||||||
toReturn = $"{cropName}";
|
toReturn = $"{cropName}";
|
||||||
@@ -373,6 +373,15 @@ namespace stardew_access.Features
|
|||||||
if (isHarvestable)
|
if (isHarvestable)
|
||||||
toReturn = "Harvestable " + toReturn;
|
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
|
else
|
||||||
{
|
{
|
||||||
toReturn = "Soil";
|
toReturn = "Soil";
|
||||||
|
Reference in New Issue
Block a user