Added config to disable inventory verbosity
If set to true, disables speaking of 'not usable here' and 'donatable' in inventoriesmaster
parent
2d061e220b
commit
b8f77384b2
|
@ -85,6 +85,7 @@ namespace stardew_access
|
|||
public Boolean Warning { get; set; } = true; // Toggles the warnings feature
|
||||
public Boolean TTS { get; set; } = true; // Toggles the screen reader/tts.
|
||||
public Boolean TrackDroppedItems {get; set;} = true; // Toggles detecting the dropped items.
|
||||
public Boolean DisableInventoryVerbosity {get; set;} = false; // If enabled, does not speaks 'not usable here' and 'donatable' in inventories
|
||||
#endregion
|
||||
|
||||
// TODO Add the exclusion and focus list too
|
||||
|
|
|
@ -264,7 +264,7 @@ namespace stardew_access.Patches
|
|||
else
|
||||
toSpeak = $"Slot {i + 1} finished: {__instance.pieceHolders[i].item.DisplayName}";
|
||||
|
||||
if (__instance.heldItem != null && __instance.pieceHolders[i].item == null)
|
||||
if (!MainClass.Config.DisableInventoryVerbosity && __instance.heldItem != null && __instance.pieceHolders[i].item == null)
|
||||
{
|
||||
int highlight = getPieceIndexForDonationItem(__instance.heldItem.ParentSheetIndex);
|
||||
if (highlight != -1 && highlight == i)
|
||||
|
|
|
@ -20,6 +20,7 @@ namespace stardew_access.Patches
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
internal static int narrateHoveredSlotAndReturnIndex(InventoryMenu inventoryMenu, List<ClickableComponent> inventory, IList<Item> actualInventory, int x, int y,
|
||||
bool giveExtraDetails = false, int hoverPrice = -1, int extraItemToShowIndex = -1, int extraItemToShowAmount = -1,
|
||||
bool handleHighlightedItem = false, String highlightedItemPrefix = "", String highlightedItemSuffix = "")
|
||||
|
@ -177,6 +178,7 @@ namespace stardew_access.Patches
|
|||
|
||||
private static String handleHighlightedItemPrefix(bool isHighlighted, String prefix)
|
||||
{
|
||||
if (MainClass.Config.DisableInventoryVerbosity) return "";
|
||||
if (!isHighlighted) return "";
|
||||
|
||||
return prefix;
|
||||
|
@ -184,6 +186,7 @@ namespace stardew_access.Patches
|
|||
|
||||
private static String handleHighlightedItemSuffix(bool isHighlighted, String suffix)
|
||||
{
|
||||
if (MainClass.Config.DisableInventoryVerbosity) return "";
|
||||
if (!isHighlighted) return "";
|
||||
|
||||
return suffix;
|
||||
|
@ -196,6 +199,7 @@ namespace stardew_access.Patches
|
|||
if (prevSlotIndex != hoveredInventoryIndex)
|
||||
Game1.playSound("invalid-selection");
|
||||
|
||||
if (MainClass.Config.DisableInventoryVerbosity) return "";
|
||||
return " not usable here";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue