Fixed door name narration
This commit is contained in:
@@ -296,7 +296,7 @@ namespace stardew_access.Game
|
|||||||
PlaySoundAt(position, "ladder", CATEGORY.Buildings);
|
PlaySoundAt(position, "ladder", CATEGORY.Buildings);
|
||||||
}
|
}
|
||||||
// Check for doors
|
// Check for doors
|
||||||
else if (ReadTile.isDoorAtTile((int)position.X, (int)position.Y).Item1)
|
else if (ReadTile.getDoorAtTile((int)position.X, (int)position.Y) != null)
|
||||||
{
|
{
|
||||||
PlaySoundAt(position, "door", CATEGORY.Buildings);
|
PlaySoundAt(position, "door", CATEGORY.Buildings);
|
||||||
}
|
}
|
||||||
|
@@ -79,7 +79,7 @@ namespace stardew_access.Game
|
|||||||
|
|
||||||
bool isColliding = isCollidingAtTile(x, y);
|
bool isColliding = isCollidingAtTile(x, y);
|
||||||
Dictionary<Vector2, Netcode.NetRef<TerrainFeature>> terrainFeature = Game1.currentLocation.terrainFeatures.FieldDict;
|
Dictionary<Vector2, Netcode.NetRef<TerrainFeature>> terrainFeature = Game1.currentLocation.terrainFeatures.FieldDict;
|
||||||
(bool, string?) door = isDoorAtTile(x, y);
|
string? door = getDoorAtTile(x, y);
|
||||||
(CATEGORY?, string?) tileInfo = getTileInfo(x, y);
|
(CATEGORY?, string?) tileInfo = getTileInfo(x, y);
|
||||||
string? junimoBundle = getJunimoBundleAt(x, y);
|
string? junimoBundle = getJunimoBundleAt(x, y);
|
||||||
string? resourceClump = getResourceClumpAtTile(x, y);
|
string? resourceClump = getResourceClumpAtTile(x, y);
|
||||||
@@ -116,9 +116,9 @@ namespace stardew_access.Game
|
|||||||
{
|
{
|
||||||
toReturn = resourceClump;
|
toReturn = resourceClump;
|
||||||
}
|
}
|
||||||
else if (door.Item1)
|
else if (door != null)
|
||||||
{
|
{
|
||||||
toReturn = (door.Item2 == null) ? "door" : door.Item2;
|
toReturn = door;
|
||||||
}
|
}
|
||||||
else if (isMineDownLadderAtTile(x, y))
|
else if (isMineDownLadderAtTile(x, y))
|
||||||
{
|
{
|
||||||
@@ -230,6 +230,8 @@ namespace stardew_access.Game
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -712,7 +714,7 @@ namespace stardew_access.Game
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static (bool, string?) isDoorAtTile(int x, int y)
|
public static string? getDoorAtTile(int x, int y)
|
||||||
{
|
{
|
||||||
Point tilePoint = new Point(x, y);
|
Point tilePoint = new Point(x, y);
|
||||||
StardewValley.Network.NetPointDictionary<string, Netcode.NetString> doorList = Game1.currentLocation.doors;
|
StardewValley.Network.NetPointDictionary<string, Netcode.NetString> doorList = Game1.currentLocation.doors;
|
||||||
@@ -724,11 +726,14 @@ namespace stardew_access.Game
|
|||||||
string? doorName;
|
string? doorName;
|
||||||
doorList.TryGetValue(tilePoint, out doorName);
|
doorList.TryGetValue(tilePoint, out doorName);
|
||||||
|
|
||||||
return (true, doorName);
|
if (doorName != null)
|
||||||
|
return $"{doorName} door";
|
||||||
|
else
|
||||||
|
return "door";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (false, null);
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string? getResourceClumpAtTile(int x, int y)
|
public static string? getResourceClumpAtTile(int x, int y)
|
||||||
@@ -782,6 +787,5 @@ namespace stardew_access.Game
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -29,6 +29,7 @@ namespace stardew_access
|
|||||||
|
|
||||||
public static IScreenReader GetScreenReader()
|
public static IScreenReader GetScreenReader()
|
||||||
{
|
{
|
||||||
|
if (screenReader == null)
|
||||||
screenReader = new ScreenReaderController().Initialize();
|
screenReader = new ScreenReaderController().Initialize();
|
||||||
return screenReader;
|
return screenReader;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user