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

View File

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

View File

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