Added water tiles to Read TIle

master
shoaib11120 2021-12-20 19:51:28 +05:30
parent af4b74f382
commit fdf9f7c0a8
1 changed files with 49 additions and 47 deletions

View File

@ -255,11 +255,13 @@ namespace stardew_access
if (!Equals(gt, prevTile))
{
prevTile = gt;
if (Game1.currentLocation.getObjectAtTile((int)gt.X, (int)gt.Y) != null)
if(Game1.currentLocation.isWaterTile(x, y)){
ScreenReader.say("Water", true);
}
else if (Game1.currentLocation.getObjectAtTile(x, y) != null)
{
#region Objects at tile (TODO)
StardewValley.Object obj = Game1.currentLocation.getObjectAtTile((int)gt.X, (int)gt.Y);
StardewValley.Object obj = Game1.currentLocation.getObjectAtTile(x, y);
string name = obj.DisplayName;
// TODO add individual stone narration using parentSheetIndex
@ -412,12 +414,12 @@ namespace stardew_access
else
{
#region Resource CLumps
Game1.currentLocation.resourceClumps.ToList().ForEach(x =>
Game1.currentLocation.resourceClumps.ToList().ForEach(clump =>
{
if (x.occupiesTile((int)gt.X, (int)gt.Y))
if (clump.occupiesTile(x, y))
{
string toSpeak;
int index = x.parentSheetIndex;
int index = clump.parentSheetIndex;
switch (index)
{
@ -451,11 +453,11 @@ namespace stardew_access
#endregion
#region Doors
Game1.currentLocation.doors.ToList().ForEach(x =>
Game1.currentLocation.doors.ToList().ForEach(item =>
{
x.Keys.ToList().ForEach(y =>
item.Keys.ToList().ForEach(ydoor =>
{
if (Equals((int)gt.X, y.X) && Equals((int)gt.Y, y.Y))
if (Equals(x, ydoor.X) && Equals(y, ydoor.Y))
{
ScreenReader.say("Door", true);
}