Shipping Menu is now accessible
parent
971b7d95da
commit
5d7a7e3f41
|
@ -107,6 +107,11 @@ namespace stardew_access
|
|||
postfix: new HarmonyMethod(typeof(MenuPatch), nameof(MenuPatch.BillboardPatch))
|
||||
);
|
||||
|
||||
harmony.Patch(
|
||||
original: AccessTools.Method(typeof(ShippingMenu), nameof(ShippingMenu.draw), new Type[] { typeof(SpriteBatch) }),
|
||||
postfix: new HarmonyMethod(typeof(MenuPatch), nameof(MenuPatch.ShippingMenuPatch))
|
||||
);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Custom Commands
|
||||
|
|
|
@ -63,7 +63,8 @@ namespace stardew_access.Patches
|
|||
if (__instance.responses.Count > 0)
|
||||
hasResponses = true;
|
||||
|
||||
if (currentDialogue != __instance.getCurrentString()) {
|
||||
if (currentDialogue != __instance.getCurrentString())
|
||||
{
|
||||
toSpeak = __instance.getCurrentString();
|
||||
currentDialogue = toSpeak;
|
||||
}
|
||||
|
@ -84,9 +85,8 @@ namespace stardew_access.Patches
|
|||
ScreenReader.sayWithChecker(toSpeak, true);
|
||||
}
|
||||
}
|
||||
else if(Game1.activeClickableMenu is DialogueBox)
|
||||
else if (Game1.activeClickableMenu is DialogueBox)
|
||||
{
|
||||
MainClass.monitor.Log("hereasad ", LogLevel.Debug);
|
||||
// Basic dialogues like `No mails in the mail box`
|
||||
if (currentDialogue != __instance.getCurrentString())
|
||||
{
|
||||
|
|
|
@ -14,6 +14,28 @@ namespace stardew_access.Patches
|
|||
private static string currentLetterText = " ";
|
||||
private static string currentDailyQuestText = " ";
|
||||
|
||||
internal static void ShippingMenuPatch(ShippingMenu __instance, List<int> ___categoryTotals)
|
||||
{
|
||||
if(__instance.currentPage == -1)
|
||||
{
|
||||
int total = ___categoryTotals[5];
|
||||
string toSpeak;
|
||||
if(__instance.okButton.containsPoint(Game1.getMousePosition(true).X, Game1.getMousePosition(true).Y))
|
||||
{
|
||||
toSpeak = $"{total}g in total. Press left mouse button to save.";
|
||||
ScreenReader.sayWithChecker(toSpeak, true);
|
||||
}
|
||||
for (int i =0; i < __instance.categories.Count; i++)
|
||||
{
|
||||
if (__instance.categories[i].containsPoint(Game1.getMousePosition(true).X, Game1.getMousePosition(true).Y))
|
||||
{
|
||||
toSpeak = $"Money recieved from {__instance.getCategoryName(i)}: {___categoryTotals[i]}g.";
|
||||
ScreenReader.sayWithChecker(toSpeak, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static void BillboardPatch(Billboard __instance, bool ___dailyQuestBoard)
|
||||
{
|
||||
if (!___dailyQuestBoard)
|
||||
|
|
Loading…
Reference in New Issue