From 75c56403cc1ea1079be84ec9b24abd83a3950789 Mon Sep 17 00:00:00 2001 From: atravita-mods <94934860+atravita-mods@users.noreply.github.com> Date: Sun, 23 Jul 2023 13:42:06 -0400 Subject: [PATCH] mobile changes --- Code/ClintVolumeControl.cs | 6 +++++- Code/HarmonyPatch_TMXLLoadMapFacingDirection.cs | 5 ++++- Code/ModEntry.cs | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Code/ClintVolumeControl.cs b/Code/ClintVolumeControl.cs index 731c51f2..81b05238 100644 --- a/Code/ClintVolumeControl.cs +++ b/Code/ClintVolumeControl.cs @@ -1,4 +1,6 @@ -using Microsoft.Xna.Framework.Audio; +#if false + +using Microsoft.Xna.Framework.Audio; using StardewModdingAPI; using StardewValley; using StardewValley.BellsAndWhistles; @@ -156,3 +158,5 @@ public void Dispose() } } } + +#endif \ No newline at end of file diff --git a/Code/HarmonyPatch_TMXLLoadMapFacingDirection.cs b/Code/HarmonyPatch_TMXLLoadMapFacingDirection.cs index 34b6956b..695db653 100644 --- a/Code/HarmonyPatch_TMXLLoadMapFacingDirection.cs +++ b/Code/HarmonyPatch_TMXLLoadMapFacingDirection.cs @@ -43,8 +43,11 @@ public static void ApplyPatch(Harmony harmony, IMonitor monitor) Monitor = monitor; //store monitor Monitor.Log($"Applying Harmony patch \"{nameof(HarmonyPatch_TMXLLoadMapFacingDirection)}\": prefixing SDV method \"Game1.warpFarmer(LocationRequest, int, int, int)\".", LogLevel.Trace); + MethodInfo original = Constants.TargetPlatform == GamePlatform.Android + ? AccessTools.Method(typeof(Game1), nameof(Game1.warpFarmer), new[] { typeof(LocationRequest), typeof(int), typeof(int), typeof(int), typeof(bool) }) + : AccessTools.Method(typeof(Game1), nameof(Game1.warpFarmer), new[] { typeof(LocationRequest), typeof(int), typeof(int), typeof(int) }); harmony.Patch( - original: AccessTools.Method(typeof(Game1), nameof(Game1.warpFarmer), new[] { typeof(LocationRequest), typeof(int), typeof(int), typeof(int) }), + original: original, prefix: new HarmonyMethod(typeof(HarmonyPatch_TMXLLoadMapFacingDirection), nameof(Game1_warpFarmer)) ); diff --git a/Code/ModEntry.cs b/Code/ModEntry.cs index b17b4814..07d7379d 100644 --- a/Code/ModEntry.cs +++ b/Code/ModEntry.cs @@ -32,7 +32,7 @@ public override void Entry(IModHelper helper) CustomBuffs.Enable(helper, Monitor); - ClintVolumeControl.Enable(helper, Monitor); + //ClintVolumeControl.Enable(helper, Monitor); FireflySpawner.Enable(helper, Monitor);