From 7a4ca8983625fc0ebb13f54953d8f5bef89c1481 Mon Sep 17 00:00:00 2001 From: Mohammad Shoaib Khan Date: Sun, 23 Oct 2022 12:12:27 +0530 Subject: [PATCH] Issue#63 Prepend the player's name in tile viewer --- stardew-access/Features/TileViewer.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stardew-access/Features/TileViewer.cs b/stardew-access/Features/TileViewer.cs index 030610e..822d057 100644 --- a/stardew-access/Features/TileViewer.cs +++ b/stardew-access/Features/TileViewer.cs @@ -174,6 +174,13 @@ namespace stardew_access.Features Vector2 position = this.GetTileCursorPosition(); Vector2 tile = this.GetViewingTile(); String? name = TileInfo.getNameAtTile(tile); + + // Prepend the player's name if the viewing tile is occupied by the player itself + if (CurrentPlayer.PositionX == tile.X && CurrentPlayer.PositionY == tile.Y) + { + name = $"{Game1.player.displayName}, {name}"; + } + if (name == null) { // Report if a tile is empty or blocked if there is nothing on it