Added mail box to read tile

master
Mohammad Shoaib 2022-05-02 12:53:34 +05:30
parent ce69a5ad98
commit 130204e39e
2 changed files with 16 additions and 12 deletions

View File

@ -149,7 +149,6 @@ namespace stardew_access.Features
toSearch.Enqueue(Game1.player.getTileLocation()); toSearch.Enqueue(Game1.player.getTileLocation());
searched.Add(Game1.player.getTileLocation()); searched.Add(Game1.player.getTileLocation());
MainClass.DebugLog(Game1.player.getTileLocation().ToString());
while (toSearch.Count > 0) while (toSearch.Count > 0)
{ {

View File

@ -302,6 +302,10 @@ namespace stardew_access.Features
public static (CATEGORY? category, string? name) getDynamicTilesInfo(int x, int y, bool lessInfo = false) public static (CATEGORY? category, string? name) getDynamicTilesInfo(int x, int y, bool lessInfo = false)
{ {
if (Game1.currentLocation is Farm farm) if (Game1.currentLocation is Farm farm)
{
if (farm.GetMainMailboxPosition().X == x && farm.GetMainMailboxPosition().Y == y)
return (CATEGORY.Interactables, "Mail box");
else
{ {
Building building = farm.getBuildingAt(new Vector2(x, y)); Building building = farm.getBuildingAt(new Vector2(x, y));
if (building != null) if (building != null)
@ -318,6 +322,7 @@ namespace stardew_access.Features
return (CATEGORY.Buildings, name); return (CATEGORY.Buildings, name);
} }
} }
}
else if (Game1.currentLocation is Town) else if (Game1.currentLocation is Town)
{ {
if (SpecialOrder.IsSpecialOrdersBoardUnlocked() && x == 62 && y == 93) if (SpecialOrder.IsSpecialOrdersBoardUnlocked() && x == 62 && y == 93)