Fixed bug in crafting/cooking menu
parent
025956f66c
commit
8bd44fe360
|
@ -1031,19 +1031,7 @@ namespace stardew_access.Patches
|
|||
#endregion
|
||||
|
||||
#region Narrate hovered recipe
|
||||
if (___hoverRecipe == null)
|
||||
{
|
||||
string query = $"unknown recipe:{__instance.getCurrentlySnappedComponent().myID}";
|
||||
|
||||
if (craftingPageQueryKey != query)
|
||||
{
|
||||
craftingPageQueryKey = query;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say("unknown recipe", true);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (___hoverRecipe != null)
|
||||
{
|
||||
string name = ___hoverRecipe.DisplayName;
|
||||
int numberOfProduce = ___hoverRecipe.numberProducedPerCraft;
|
||||
|
@ -1119,6 +1107,32 @@ namespace stardew_access.Patches
|
|||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
var isRecipeInFocus = false;
|
||||
foreach (var item in __instance.pagesOfCraftingRecipes[___currentCraftingPage])
|
||||
{
|
||||
if (item.Key.containsPoint(x, y))
|
||||
{
|
||||
isRecipeInFocus = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isRecipeInFocus)
|
||||
{
|
||||
string query = $"unknown recipe:{__instance.getCurrentlySnappedComponent().myID}";
|
||||
|
||||
if (craftingPageQueryKey != query)
|
||||
{
|
||||
craftingPageQueryKey = query;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say("unknown recipe", true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Narrate hovered item
|
||||
|
|
Loading…
Reference in New Issue