Added required item to hover item narration
This commit is contained in:
		| @@ -108,7 +108,7 @@ namespace stardew_access.Patches | ||||
|             currentDialogue = " "; | ||||
|         } | ||||
|  | ||||
|         internal static void HoverTextPatch(string? text, int moneyAmountToDisplayAtBottom = -1, string? boldTitleText = null, string[]? buffIconsToDisplay = null, Item? hoveredItem = null, CraftingRecipe? craftingIngredients = null) | ||||
|         internal static void HoverTextPatch(string? text, int moneyAmountToDisplayAtBottom = -1, string? boldTitleText = null, int extraItemToShowIndex = -1, int extraItemToShowAmount = -1, string[]? buffIconsToDisplay = null, Item? hoveredItem = null, CraftingRecipe? craftingIngredients = null) | ||||
|         { | ||||
|             try | ||||
|             { | ||||
| @@ -179,6 +179,18 @@ namespace stardew_access.Patches | ||||
|                 } | ||||
|                 #endregion | ||||
|  | ||||
|                 #region Narrate hovered required ingredients | ||||
|                 if (extraItemToShowIndex != -1) | ||||
|                 { | ||||
|                     string itemName = Game1.objectInformation[extraItemToShowIndex].Split('/')[0]; | ||||
|  | ||||
|                     if (extraItemToShowAmount != -1) | ||||
|                         toSpeak.Append($"Required: {extraItemToShowAmount} {itemName}"); | ||||
|                     else | ||||
|                         toSpeak.Append($"Required: {itemName}"); | ||||
|                 } | ||||
|                 #endregion | ||||
|  | ||||
|                 #region Add money | ||||
|                 if (moneyAmountToDisplayAtBottom != -1) | ||||
|                     toSpeak.Append($"\nCost: {moneyAmountToDisplayAtBottom}g\n"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user