Added check for unknown recipe in crafting/cooking menu
parent
53f7e3ceb0
commit
041afa68a0
|
@ -191,6 +191,9 @@ namespace stardew_access.Patches
|
|||
|
||||
if (Game1.activeClickableMenu is PurchaseAnimalsMenu)
|
||||
return;
|
||||
|
||||
if (Game1.activeClickableMenu is CraftingPage)
|
||||
return;
|
||||
#endregion
|
||||
|
||||
string toSpeak = " ";
|
||||
|
|
|
@ -1031,7 +1031,19 @@ namespace stardew_access.Patches
|
|||
#endregion
|
||||
|
||||
#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;
|
||||
int numberOfProduce = ___hoverRecipe.numberProducedPerCraft;
|
||||
|
|
Loading…
Reference in New Issue