Added sound cue when the slot item is not usable

This commit is contained in:
Mohammad Shoaib Khan
2023-02-20 11:48:24 +05:30
parent 34d773204c
commit d2c34451b3
5 changed files with 55 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ namespace stardew_access.Patches
internal static string pondQueryMenuQuery = " ";
internal static string forgeMenuQuery = " ";
internal static string itemListMenuQuery = " ";
internal static int prevSlotIndex = -999;
public static Vector2? prevTile = null;
internal static void ItemListMenuPatch(ItemListMenu __instance, string ___title, int ___currentTab, int ___totalValueOfItems, List<Item> ___itemsToList)
@@ -143,6 +144,13 @@ namespace stardew_access.Patches
{
toSpeak = $"{toSpeak} not usable here";
}
if (prevSlotIndex != i)
{
prevSlotIndex = i;
MainClass.DebugLog("here");
Game1.playSound("invalid-selection");
}
}
if (forgeMenuQuery != $"{toSpeak}:{i}")
@@ -310,6 +318,13 @@ namespace stardew_access.Patches
{
toSpeak = $"{toSpeak} not usable here";
}
if (prevSlotIndex != i)
{
prevSlotIndex = i;
MainClass.DebugLog("here");
Game1.playSound("invalid-selection");
}
}
if (tailoringMenuQuery != $"{toSpeak}:{i}")