Fixed footsteps sounds when colliding to mine rocks

master
shoaib11120 2022-01-14 11:02:04 +05:30
parent 4bce675697
commit 389710778a
3 changed files with 15 additions and 19 deletions

View File

@ -308,7 +308,7 @@ namespace stardew_access.Game
return seedName;
}
public static string getObjectNameAtTile(int x, int y)
public static string? getObjectNameAtTile(int x, int y)
{
string? toReturn = null;
@ -475,9 +475,8 @@ namespace stardew_access.Game
return false;
}
public static string getResourceClumpAtTile(int x, int y)
public static string? getResourceClumpAtTile(int x, int y)
{
string? toReturn = null;
for(int i = 0; i < Game1.currentLocation.resourceClumps.Count; i++)
{
@ -488,33 +487,25 @@ namespace stardew_access.Game
switch (index)
{
case 600:
toReturn = "Large Stump";
break;
return "Large Stump";
case 602:
toReturn = "Hollow Log";
break;
return "Hollow Log";
case 622:
toReturn = "Meteorite";
break;
return "Meteorite";
case 752:
case 754:
case 756:
case 758:
toReturn = "Mine Rock";
break;
return "Mine Rock";
case 672:
toReturn = "Boulder";
break;
return "Boulder";
default:
toReturn = "Unknown";
break;
return "Unknown";
}
return toReturn;
}
}
return toReturn;
return null;
}
}
}

View File

@ -47,6 +47,11 @@ namespace stardew_access.Patches
return false;
}
#endregion
#region Check for resource clumps
if(ReadTile.getResourceClumpAtTile((int)gt.X, (int) gt.Y)!=null)
return false;
#endregion
}
}
catch (Exception e)

View File

@ -1,7 +1,7 @@
{
"Name": "Stardew Access",
"Author": "Mohammad Shoaib",
"Version": "1.0.14-beta",
"Version": "1.0.15-beta",
"Description": "An accessibility mod with screen reader support!",
"UniqueID": "shoaib.stardewaccess",
"EntryDll": "stardew-access.dll",