From 53433445e36ac4d10e54b78a3eaff3e9477b8969 Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Sat, 30 Oct 2021 19:33:59 +0100 Subject: [PATCH] fix map patches + cleanup --- QSB/DeathSync/Patches/MapPatches.cs | 14 +++++++------- QSB/DeathSync/Patches/RespawnPatches.cs | 6 ------ QSB/RoastingSync/Patches/RoastingPatches.cs | 9 --------- 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/QSB/DeathSync/Patches/MapPatches.cs b/QSB/DeathSync/Patches/MapPatches.cs index cf233fd5..c07aef21 100644 --- a/QSB/DeathSync/Patches/MapPatches.cs +++ b/QSB/DeathSync/Patches/MapPatches.cs @@ -1,18 +1,16 @@ -using QSB.Patches; +using HarmonyLib; +using QSB.Patches; using UnityEngine; namespace QSB.DeathSync.Patches { + [HarmonyPatch] internal class MapPatches : QSBPatch { public override QSBPatchTypes Type => QSBPatchTypes.RespawnTime; - //public override void DoPatches() - //{ - // Prefix(nameof(MapController.LateUpdate), nameof(MapController_LateUpdate)); - // Prefix(nameof(MapController.EnterMapView), nameof(MapController_EnterMapView)); - //} - + [HarmonyPrefix] + [HarmonyPatch(typeof(MapController), nameof(MapController.EnterMapView))] public static bool MapController_EnterMapView( MapController __instance, ref bool ____isMapMode, @@ -95,6 +93,8 @@ namespace QSB.DeathSync.Patches return false; } + [HarmonyPrefix] + [HarmonyPatch(typeof(MapController), nameof(MapController.LateUpdate))] public static bool MapController_LateUpdate( MapController __instance, ref float ____observatoryRevealTwist, diff --git a/QSB/DeathSync/Patches/RespawnPatches.cs b/QSB/DeathSync/Patches/RespawnPatches.cs index 34d96c63..00bddc16 100644 --- a/QSB/DeathSync/Patches/RespawnPatches.cs +++ b/QSB/DeathSync/Patches/RespawnPatches.cs @@ -9,12 +9,6 @@ namespace QSB.DeathSync.Patches { public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect; - //public override void DoPatches() - //{ - // Prefix(nameof(PlayerRecoveryPoint.OnGainFocus), nameof(PlayerRecoveryPoint_OnGainFocus)); - // Prefix(nameof(PlayerRecoveryPoint.OnPressInteract), nameof(PlayerRecoveryPoint_OnPressInteract)); - //} - [HarmonyPrefix] [HarmonyPatch(typeof(PlayerRecoveryPoint), nameof(PlayerRecoveryPoint.OnGainFocus))] public static bool PlayerRecoveryPoint_OnGainFocus( diff --git a/QSB/RoastingSync/Patches/RoastingPatches.cs b/QSB/RoastingSync/Patches/RoastingPatches.cs index 0e85f3d2..60829919 100644 --- a/QSB/RoastingSync/Patches/RoastingPatches.cs +++ b/QSB/RoastingSync/Patches/RoastingPatches.cs @@ -10,15 +10,6 @@ namespace QSB.RoastingSync.Patches { public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect; - //public override void DoPatches() - //{ - // Prefix(nameof(RoastingStickController.UpdateMarshmallowInput), nameof(RoastingStickController_UpdateMarshmallowInput)); - // Prefix(nameof(Marshmallow.Burn), nameof(Marshmallow_Burn)); - // Prefix(nameof(Marshmallow.Shrivel), nameof(Marshmallow_Shrivel)); - // Prefix(nameof(Marshmallow.RemoveMallow), nameof(Marshmallow_RemoveMallow)); - // Prefix(nameof(Marshmallow.SpawnMallow), nameof(Marshmallow_SpawnMallow)); - //} - [HarmonyPrefix] [HarmonyPatch(typeof(Marshmallow), nameof(Marshmallow.SpawnMallow))] public static bool Marshmallow_SpawnMallow()