From 838273b3ce1449cc52bcae9d35e0233281ab4c0f Mon Sep 17 00:00:00 2001 From: bradjrenshaw Date: Tue, 10 May 2022 00:05:35 -0400 Subject: [PATCH] Read blocked or empty tiles if no object is on a tile. --- stardew-access/Features/MouseHandler.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/stardew-access/Features/MouseHandler.cs b/stardew-access/Features/MouseHandler.cs index 5b615f6..b93c96b 100644 --- a/stardew-access/Features/MouseHandler.cs +++ b/stardew-access/Features/MouseHandler.cs @@ -65,10 +65,17 @@ namespace stardew_access.Features { if (!tryMoveTileView(delta)) return; Vector2 position = this.getTileCursorPosition(); - String ?name = TileInfo.getNameAtTile(position / Game1.tileSize); + Vector2 tile = position / Game1.tileSize; + String ?name = TileInfo.getNameAtTile(tile); if (name == null) { - name = "empty tile"; + if (TileInfo.isCollidingAtTile((int)tile.X, (int)tile.Y)) + { + name = "blocked"; + } else + { + name = "empty"; + } } if (precise) {