adding stumps to read tyle in secret woods (foot steps still ned to be

silenced)
master
TrueBlindGaming 2022-02-11 12:56:27 -06:00
parent 41e29a40ba
commit 6c78c9dbd3
1 changed files with 26 additions and 4 deletions

View File

@ -142,6 +142,10 @@ namespace stardew_access.Game
else if (getJunimoBundleAt(x, y) != null) else if (getJunimoBundleAt(x, y) != null)
{ {
toSpeak = getJunimoBundleAt(x, y); toSpeak = getJunimoBundleAt(x, y);
}
else if (getStumpsInWoods(x, y) != null)
{
toSpeak = getStumpsInWoods(x, y);
} }
#endregion #endregion
@ -177,7 +181,6 @@ namespace stardew_access.Game
{ {
if (Game1.currentLocation is not CommunityCenter) if (Game1.currentLocation is not CommunityCenter)
return null; return null;
CommunityCenter communityCenter = (Game1.currentLocation as CommunityCenter); CommunityCenter communityCenter = (Game1.currentLocation as CommunityCenter);
string? name = (x, y) switch string? name = (x, y) switch
@ -747,5 +750,24 @@ namespace stardew_access.Game
return null; return null;
} }
public static string? getStumpsInWoods(int x, int y)
{
string strIndex = null;
if (Game1.currentLocation is not Woods)
{
return null;
}
Netcode.NetObjectList<ResourceClump> stumps = ((Woods)Game1.currentLocation).stumps;
for (int i = 0; i < stumps.Count; i++)
{
if (stumps[i].occupiesTile(x, y))
{
return "large stump";
}
}
return null;
}
} }
} }