Read blocked or empty tiles if no object is on a tile.

master
bradjrenshaw 2022-05-10 00:05:35 -04:00
parent bc6ec49619
commit 838273b3ce
1 changed files with 9 additions and 2 deletions

View File

@ -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)
{