Geode menu is now accessible
parent
12bd0bea80
commit
b3657c080f
|
@ -15,6 +15,24 @@ namespace stardew_access.Patches
|
|||
{
|
||||
int x = Game1.getMousePosition(true).X, y = Game1.getMousePosition(true).Y; // Mouse x and y position
|
||||
|
||||
#region Narrate the treasure recieved on breaking the geode
|
||||
if (__instance.geodeTreasure != null)
|
||||
{
|
||||
string name = __instance.geodeTreasure.DisplayName;
|
||||
int stack = __instance.geodeTreasure.Stack;
|
||||
|
||||
string toSpeak = $"Recieved {stack} {name}";
|
||||
|
||||
if (geodeMenuQueryKey != toSpeak)
|
||||
{
|
||||
geodeMenuQueryKey = toSpeak;
|
||||
ScreenReader.say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Narrate hovered buttons in the menu
|
||||
if (__instance.geodeSpot != null && __instance.geodeSpot.containsPoint(x, y))
|
||||
{
|
||||
string toSpeak = "Place geode here";
|
||||
|
@ -61,7 +79,9 @@ namespace stardew_access.Patches
|
|||
}
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Narrate hovered item
|
||||
for (int i = 0; i < __instance.inventory.inventory.Count; i++)
|
||||
{
|
||||
if (__instance.inventory.inventory[i].containsPoint(x, y))
|
||||
|
@ -100,6 +120,7 @@ namespace stardew_access.Patches
|
|||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue