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)
|
if (Game1.activeClickableMenu is PurchaseAnimalsMenu)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (Game1.activeClickableMenu is CraftingPage)
|
||||||
|
return;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
string toSpeak = " ";
|
string toSpeak = " ";
|
||||||
|
|
|
@ -1031,7 +1031,19 @@ 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;
|
||||||
|
|
Loading…
Reference in New Issue