From 97fabf76382ccce3575fe61261816e8e1d73fd90 Mon Sep 17 00:00:00 2001 From: Mohammad Shoaib Date: Sat, 30 Apr 2022 20:16:51 +0530 Subject: [PATCH] Added building human and animal doors to read tile --- stardew-access/Features/TileInfo.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stardew-access/Features/TileInfo.cs b/stardew-access/Features/TileInfo.cs index e01b56b..b809df3 100644 --- a/stardew-access/Features/TileInfo.cs +++ b/stardew-access/Features/TileInfo.cs @@ -299,7 +299,14 @@ namespace stardew_access.Features { Building building = farm.getBuildingAt(new Vector2(x, y)); if (building != null) - return (CATEGORY.Buildings, building.buildingType.Value); + { + if ((building.humanDoor.Value.X + building.tileX.Value) == x && (building.humanDoor.Value.Y + building.tileY.Value) == y) + return (CATEGORY.Doors, building.buildingType.Value + " Door"); + else if ((building.animalDoor.Value.X + building.tileX.Value) == x && (building.animalDoor.Value.Y + building.tileY.Value) == y) + return (CATEGORY.Doors, building.buildingType.Value + " Animal Door " + ((building.animalDoorOpen.Value) ? "Opened" : "Closed")); + else + return (CATEGORY.Buildings, building.buildingType.Value); + } } else if (Game1.currentLocation is Town) {