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