From 4dff690bbe755aa16df58d46ce5b7bafd4efa2b1 Mon Sep 17 00:00:00 2001 From: Mohammad Shoaib Date: Thu, 28 Apr 2022 23:50:26 +0530 Subject: [PATCH] Added beach bridge --- stardew-access/Features/TileInfo.cs | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/stardew-access/Features/TileInfo.cs b/stardew-access/Features/TileInfo.cs index bc74204..247370b 100644 --- a/stardew-access/Features/TileInfo.cs +++ b/stardew-access/Features/TileInfo.cs @@ -39,7 +39,7 @@ namespace stardew_access.Features bool isColliding = isCollidingAtTile(x, y); Dictionary> terrainFeature = Game1.currentLocation.terrainFeatures.FieldDict; string? door = getDoorAtTile(x, y); - (CATEGORY? category, string? name) tileInfo = getDynamicTilesInfo(x, y); + (CATEGORY? category, string? name) dynamicTile = getDynamicTilesInfo(x, y); string? junimoBundle = getJunimoBundleAt(x, y); string? resourceClump = getResourceClumpAtTile(x, y); string? farmAnimal = getFarmAnimalAt(Game1.currentLocation, x, y); @@ -65,6 +65,11 @@ namespace stardew_access.Features toReturn = staticTile.name; category = staticTile.category; } + else if (dynamicTile.name != null) + { + toReturn = dynamicTile.name; + category = dynamicTile.category; + } else if (Game1.currentLocation is VolcanoDungeon && ((VolcanoDungeon)Game1.currentLocation).IsCooledLava(x, y)) { toReturn = "Cooled lava"; @@ -132,11 +137,6 @@ namespace stardew_access.Features toReturn = parrot; category = CATEGORY.Buildings; } - else if (tileInfo.name != null) - { - toReturn = tileInfo.name; - category = tileInfo.category; - } else if (junimoBundle != null) { toReturn = junimoBundle; @@ -326,6 +326,16 @@ namespace stardew_access.Features if (forest.travelingMerchantDay && x == 27 && y == 11) return (CATEGORY.Interactables, "Travelling Merchant"); } + else if (Game1.currentLocation is Beach beach) + { + if (x == 58 && y == 13) + { + if (!beach.bridgeFixed.Value) + return (CATEGORY.Interactables, "Repair Bridge"); + else + return (CATEGORY.Bridges, "Bridge"); + } + } return (null, null); } @@ -556,7 +566,7 @@ namespace stardew_access.Features } else if (obj is Furniture) toReturn.category = CATEGORY.Furnitures; - else if (obj.type == "Crafting" && obj.bigCraftable) + else if (obj.Type == "Crafting" && obj.bigCraftable.Value) { foreach (string machine in trackable_machines)