Fixed bug for Museum menu patch
This commit is contained in:
@@ -88,6 +88,8 @@ namespace stardew_access.Patches
|
||||
{
|
||||
if (__instance.heldItem != null) return;
|
||||
|
||||
if (narrateHoveredButtons(__instance, x, y)) return;
|
||||
|
||||
int hoveredItemIndex = InventoryUtils.narrateHoveredSlotAndReturnIndex(__instance.inventory, __instance.inventory.inventory, __instance.inventory.actualInventory, x, y,
|
||||
handleHighlightedItem: true, highlightedItemPrefix: "Donatable ");
|
||||
if (hoveredItemIndex != -9999)
|
||||
@@ -99,7 +101,9 @@ namespace stardew_access.Patches
|
||||
manuallyDonateItem(__instance, hoveredItemIndex);
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
private static bool narrateHoveredButtons(MuseumMenu __instance, int x, int y)
|
||||
{
|
||||
string toSpeak = "";
|
||||
bool isDropItemButton = false;
|
||||
@@ -115,7 +119,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (museumQueryKey != toSpeak)
|
||||
@@ -124,7 +128,8 @@ namespace stardew_access.Patches
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
if (isDropItemButton) Game1.playSound("drop_item");
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void manuallyDonateItem(MuseumMenu __instance, int i)
|
||||
|
Reference in New Issue
Block a user