Some more fixes to read tile

master
shoaib11120 2021-12-25 14:32:22 +05:30
parent b3b77a9fed
commit 4f65582704
2 changed files with 11 additions and 4 deletions

View File

@ -186,7 +186,7 @@ namespace stardew_access
} }
// Manual read tile // Manual read tile
if(Equals(e.Button, SButton.P)) if(Equals(e.Button, SButton.J))
{ {
ReadTile(manuallyTriggered: true); ReadTile(manuallyTriggered: true);
} }
@ -251,9 +251,13 @@ namespace stardew_access
Vector2 gt = new Vector2(x, y); Vector2 gt = new Vector2(x, y);
#endregion #endregion
if (Context.IsPlayerFree) if (Context.IsPlayerFree)
{ {
if (!manuallyTriggered && prevTile != gt)
{
ScreenReader.prevText = " ";
}
Dictionary<Vector2, Netcode.NetRef<TerrainFeature>> terrainFeature = Game1.currentLocation.terrainFeatures.FieldDict; Dictionary<Vector2, Netcode.NetRef<TerrainFeature>> terrainFeature = Game1.currentLocation.terrainFeatures.FieldDict;
string toSpeak = " "; string toSpeak = " ";
@ -461,7 +465,10 @@ namespace stardew_access
else else
ScreenReader.sayWithTileQuery(toSpeak, x, y, true); ScreenReader.sayWithTileQuery(toSpeak, x, y, true);
#endregion #endregion
prevTile = gt;
} }
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -6,7 +6,7 @@ namespace stardew_access
internal class ScreenReader internal class ScreenReader
{ {
public static IAccessibleOutput? screenReader = null; public static IAccessibleOutput? screenReader = null;
private static string prevText = ""; internal static string prevText = "";
public static void initializeScreenReader() public static void initializeScreenReader()
{ {