Issue#23 Added Signs to read tile

master
Mohammad Shoaib Khan 2022-08-13 12:15:38 +05:30
parent 9199d764ba
commit 949e5c5bfc
1 changed files with 9 additions and 3 deletions

View File

@ -693,11 +693,16 @@ namespace stardew_access.Features
} }
else if (obj is IndoorPot indoorPot) else if (obj is IndoorPot indoorPot)
{ {
toReturn.name = $"{obj.DisplayName} {getHoeDirtDetail(indoorPot.hoeDirt)}"; toReturn.name = $"{obj.DisplayName}, {getHoeDirtDetail(indoorPot.hoeDirt)}";
} }
else if (obj is Furniture) else if (obj is Sign sign)
{ {
if (lessInfo && (((Furniture)obj).TileLocation.X != x || ((Furniture)obj).TileLocation.Y != y)) if (sign.displayItem.Value != null)
toReturn.name = $"{obj.DisplayName}, {sign.displayItem.Value.DisplayName}";
}
else if (obj is Furniture furniture)
{
if (lessInfo && (furniture.TileLocation.X != x || furniture.TileLocation.Y != y))
{ {
toReturn.category = CATEGORY.Others; toReturn.category = CATEGORY.Others;
toReturn.name = null; toReturn.name = null;
@ -727,6 +732,7 @@ namespace stardew_access.Features
else if (machineState == MachineState.Busy) else if (machineState == MachineState.Busy)
toReturn.name = $"Busy {toReturn.name}"; toReturn.name = $"Busy {toReturn.name}";
} }
return toReturn; return toReturn;
} }