Shipping Menu is now accessible
This commit is contained in:
		| @@ -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; | ||||
|                     } | ||||
| @@ -86,7 +87,6 @@ namespace stardew_access.Patches | ||||
|                 } | ||||
|                 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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user