Added sound cue when the slot item is not usable
This commit is contained in:
32
invalid-selection-license.txt
Normal file
32
invalid-selection-license.txt
Normal 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 ====
|
@@ -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);
|
||||
|
@@ -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)
|
||||
|
@@ -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}")
|
||||
|
BIN
stardew-access/assets/sounds/invalid-selection.wav
Normal file
BIN
stardew-access/assets/sounds/invalid-selection.wav
Normal file
Binary file not shown.
Reference in New Issue
Block a user