From 43c3dbb0d857a73be801e8932d4038dbe757215b Mon Sep 17 00:00:00 2001 From: bradjrenshaw Date: Sun, 8 May 2022 19:22:28 -0400 Subject: [PATCH 1/2] Added diggable golden walnut locations to ginger Island tileInfo. --- stardew-access/Features/TileInfo.cs | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/stardew-access/Features/TileInfo.cs b/stardew-access/Features/TileInfo.cs index fd0862f..8e075b9 100644 --- a/stardew-access/Features/TileInfo.cs +++ b/stardew-access/Features/TileInfo.cs @@ -430,17 +430,24 @@ namespace stardew_access.Features else if (x == 8 && y == 9) return (((!Game1.MasterPlayer.hasOrWillReceiveMail("willyBoatAnchor")) ? CATEGORY.Interactables : CATEGORY.Decor), ((!Game1.MasterPlayer.hasOrWillReceiveMail("willyBoatAnchor")) ? "Repair " : "") + "Boat Anchor"); } - else if (Game1.currentLocation is IslandWest islandWest) + else if (Game1.currentLocation is IslandLocation islandLocation) { - if (islandWest.shippingBinPosition.X == x && islandWest.shippingBinPosition.Y == y) - return (CATEGORY.Interactables, "Shipping Bin"); + var nutTracker = Game1.player.team.collectedNutTracker; + if (islandLocation.IsBuriedNutLocation(new Point(x, y)) && !nutTracker.ContainsKey("Buried_" + islandLocation.Name + "_" + x + "_" + y)) + { + return (CATEGORY.Interactables, "Diggable spot"); + } + else if (Game1.currentLocation is IslandWest islandWest) + { + if (islandWest.shippingBinPosition.X == x && islandWest.shippingBinPosition.Y == y) + return (CATEGORY.Interactables, "Shipping Bin"); + } + else if (Game1.currentLocation is IslandNorth islandNorth) + { + if (islandNorth.traderActivated.Value && x == 36 && y == 71) + return (CATEGORY.Interactables, "Island Trader"); + } } - else if (Game1.currentLocation is IslandNorth islandNorth) - { - if (islandNorth.traderActivated.Value && x == 36 && y == 71) - return (CATEGORY.Interactables, "Island Trader"); - } - return (null, null); } From 72f1835929880ea955693eb6bf0d1af1a6fda528 Mon Sep 17 00:00:00 2001 From: bradjrenshaw Date: Sun, 8 May 2022 19:31:04 -0400 Subject: [PATCH 2/2] Brief refactor for readability. --- stardew-access/Features/TileInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stardew-access/Features/TileInfo.cs b/stardew-access/Features/TileInfo.cs index 8e075b9..bf1c848 100644 --- a/stardew-access/Features/TileInfo.cs +++ b/stardew-access/Features/TileInfo.cs @@ -433,7 +433,7 @@ namespace stardew_access.Features else if (Game1.currentLocation is IslandLocation islandLocation) { var nutTracker = Game1.player.team.collectedNutTracker; - if (islandLocation.IsBuriedNutLocation(new Point(x, y)) && !nutTracker.ContainsKey("Buried_" + islandLocation.Name + "_" + x + "_" + y)) + if (islandLocation.IsBuriedNutLocation(new Point(x, y)) && !nutTracker.ContainsKey($"Buried_{islandLocation.Name}_{x}_{y}")) { return (CATEGORY.Interactables, "Diggable spot"); }