diff --git a/stardew-access/Features/ReadTile.cs b/stardew-access/Features/ReadTile.cs index a073b67..7b1831d 100644 --- a/stardew-access/Features/ReadTile.cs +++ b/stardew-access/Features/ReadTile.cs @@ -143,8 +143,12 @@ namespace stardew_access.Game { toSpeak = getJunimoBundleAt(x, y); } - #endregion - + else if (getStumpsInWoods(x, y) != null) + { + toSpeak = getStumpsInWoods(x, y); + } + #endregion + #region Narrate toSpeak if (toSpeak != " ") if (manuallyTriggered) @@ -177,8 +181,7 @@ namespace stardew_access.Game { if (Game1.currentLocation is not CommunityCenter) return null; - - CommunityCenter communityCenter = (Game1.currentLocation as CommunityCenter); +CommunityCenter communityCenter = (Game1.currentLocation as CommunityCenter); string? name = (x, y) switch { @@ -747,5 +750,24 @@ namespace stardew_access.Game return null; } + + public static string? getStumpsInWoods(int x, int y) + { + string strIndex = null; + if (Game1.currentLocation is not Woods) + { + return null; + } + Netcode.NetObjectList stumps = ((Woods)Game1.currentLocation).stumps; + for (int i = 0; i < stumps.Count; i++) + { + if (stumps[i].occupiesTile(x, y)) + { + return "large stump"; + } + } + return null; + } + } }