From 949e5c5bfc3314f6cfef8e3a369fc50b6637e504 Mon Sep 17 00:00:00 2001 From: Mohammad Shoaib Khan Date: Sat, 13 Aug 2022 12:15:38 +0530 Subject: [PATCH] Issue#23 Added Signs to read tile --- stardew-access/Features/TileInfo.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stardew-access/Features/TileInfo.cs b/stardew-access/Features/TileInfo.cs index 322e691..240572c 100644 --- a/stardew-access/Features/TileInfo.cs +++ b/stardew-access/Features/TileInfo.cs @@ -693,11 +693,16 @@ namespace stardew_access.Features } 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.name = null; @@ -727,6 +732,7 @@ namespace stardew_access.Features else if (machineState == MachineState.Busy) toReturn.name = $"Busy {toReturn.name}"; } + return toReturn; }