Added sound cue when the slot item is not usable

master
Mohammad Shoaib Khan 2023-02-20 11:48:24 +05:30
parent 34d773204c
commit d2c34451b3
No known key found for this signature in database
GPG Key ID: D8040D966320B620
5 changed files with 55 additions and 1 deletions

View File

@ -0,0 +1,32 @@
PIXABAY LICENSE CERTIFICATE
==============================================
This document confirms the download of an audio file pursuant to the Pixabay License as defined in the Pixabay Terms of Service available at https://https://pixabay.com/service/terms/
Licensor's Username:
https://pixabay.com/users/pixabay-1/
Licensee:
TheOneWhoKnocks
Audio File Title:
Invalid Selection
Audio File URL:
https://pixabay.com/sound-effects/invalid-selection-39351/
Audio File ID:
39351
Date of download:
2023-02-20 05:52:26 UTC
Pixabay GmbH c/o Lacore Rechtsanwälte LLP
Berliner Freiheit 2, 10785 Berlin, Germany
Pixabay is a user-contributed stock content website. The above-named Licensor is responsible for this audio file. Pixabay monitors uploaded audio files only to a reasonable extent. Pixabay cannot be held responsible for the acts or omissions of its users and does not represent or warrant that any required third-party consents or licenses have been obtained.
For any queries related to this document please contact Pixabay via info@pixabay.com.
==== THIS IS NOT A TAX RECEIPT OR INVOICE ====

View File

@ -22,6 +22,7 @@ namespace stardew_access
soundEffects.Add("drop_item", TYPE.Sound);
soundEffects.Add("colliding", TYPE.Sound);
soundEffects.Add("invalid-selection", TYPE.Sound);
soundEffects.Add("npc_top", TYPE.Footstep);
soundEffects.Add("npc_right", TYPE.Footstep);

View File

@ -1,5 +1,4 @@
using StardewValley;
using StardewValley.Locations;
using StardewValley.Menus;
using StardewValley.Objects;
@ -21,6 +20,7 @@ namespace stardew_access.Patches
internal static string profilePageQuery = "";
internal static int currentSelectedCraftingRecipe = -1;
internal static bool isSelectingRecipe = false;
internal static int prevSlotIndex = -999;
internal static void CollectionsPagePatch(CollectionsPage __instance)
{
@ -1295,6 +1295,12 @@ namespace stardew_access.Patches
if (!inventoryMenu.highlightMethod(actualInventory[i]))
{
name = $"{name} not usable here";
if (prevSlotIndex != i)
{
prevSlotIndex = i;
Game1.playSound("invalid-selection");
}
}
if (giveExtraDetails)

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}")