Fixed hovered item count
parent
20b822a284
commit
8fd846a5bc
|
@ -105,11 +105,6 @@ namespace stardew_access
|
||||||
postfix: new HarmonyMethod(typeof(MenuPatch), nameof(MenuPatch.BillboardPatch))
|
postfix: new HarmonyMethod(typeof(MenuPatch), nameof(MenuPatch.BillboardPatch))
|
||||||
);
|
);
|
||||||
|
|
||||||
harmony.Patch(
|
|
||||||
original: AccessTools.Method(typeof(InventoryMenu), nameof(InventoryMenu.hover)),
|
|
||||||
postfix: new HarmonyMethod(typeof(MenuPatch), nameof(MenuPatch.InventoryMenuPatch))
|
|
||||||
);
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Custom Commands
|
#region Custom Commands
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace stardew_access.Patches
|
||||||
ScreenReader.say(toSpeak, false);
|
ScreenReader.say(toSpeak, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (__instance.isQuestion)
|
else if (__instance.isQuestion || __instance.responses.Count > 0)
|
||||||
{
|
{
|
||||||
// For Dialogues with responses/answers like the dialogue when we click on tv
|
// For Dialogues with responses/answers like the dialogue when we click on tv
|
||||||
string toSpeak = " ";
|
string toSpeak = " ";
|
||||||
|
@ -89,6 +89,15 @@ namespace stardew_access.Patches
|
||||||
|
|
||||||
StringBuilder toSpeak = new StringBuilder();
|
StringBuilder toSpeak = new StringBuilder();
|
||||||
|
|
||||||
|
#region Add item count before title
|
||||||
|
if(hoveredItem != null)
|
||||||
|
{
|
||||||
|
int count = hoveredItem.Stack;
|
||||||
|
if(count > 1)
|
||||||
|
toSpeak.Append($"{count} ");
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Add title if any
|
#region Add title if any
|
||||||
if (boldTitleText != null)
|
if (boldTitleText != null)
|
||||||
toSpeak.Append($"{boldTitleText}\n");
|
toSpeak.Append($"{boldTitleText}\n");
|
||||||
|
|
|
@ -14,19 +14,6 @@ namespace stardew_access.Patches
|
||||||
private static string currentLetterText = " ";
|
private static string currentLetterText = " ";
|
||||||
private static string currentDailyQuestText = " ";
|
private static string currentDailyQuestText = " ";
|
||||||
|
|
||||||
public static void InventoryMenuPatch(InventoryMenu __instance, Item __result)
|
|
||||||
{
|
|
||||||
if (__result == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (__result.Stack > 1)
|
|
||||||
{
|
|
||||||
__instance.hoverTitle = $"{__result.Stack} {__result.DisplayName}";
|
|
||||||
__instance.descriptionTitle = __result.Stack + __result.DisplayName;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static void BillboardPatch(Billboard __instance, bool ___dailyQuestBoard)
|
internal static void BillboardPatch(Billboard __instance, bool ___dailyQuestBoard)
|
||||||
{
|
{
|
||||||
if (!___dailyQuestBoard)
|
if (!___dailyQuestBoard)
|
||||||
|
|
Loading…
Reference in New Issue