From e8defd38df73e9f8687dd1d75bb1671f6d9d01fa Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Fri, 11 Mar 2022 02:26:58 -0800 Subject: [PATCH] make PlayerAttachWatcher a QSBPatch --- QSB/Player/PlayerAttachWatcher.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/QSB/Player/PlayerAttachWatcher.cs b/QSB/Player/PlayerAttachWatcher.cs index b1eeaf06..58745b74 100644 --- a/QSB/Player/PlayerAttachWatcher.cs +++ b/QSB/Player/PlayerAttachWatcher.cs @@ -1,17 +1,12 @@ using HarmonyLib; -using QSB.Utility; -using UnityEngine; +using QSB.Patches; namespace QSB.Player; [HarmonyPatch(typeof(PlayerAttachPoint))] -internal class PlayerAttachWatcher : MonoBehaviour, IAddComponentOnStart +internal class PlayerAttachWatcher : QSBPatch { - private void Awake() - { - Harmony.CreateAndPatchAll(typeof(PlayerAttachWatcher)); - Destroy(this); - } + public override QSBPatchTypes Type => QSBPatchTypes.OnModStart; public static PlayerAttachPoint Current { get; private set; }