using QSB.Patches; namespace QSB.PoolSync.Patches { internal class PoolPatches : QSBPatch { public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect; public override void DoPatches() { QSBCore.HarmonyHelper.AddPrefix("Awake", typeof(PoolPatches), nameof(ReturnFalse)); QSBCore.HarmonyHelper.AddPrefix("Update", typeof(PoolPatches), nameof(ReturnFalse)); QSBCore.HarmonyHelper.AddPrefix("OnSocketableRemoved", typeof(PoolPatches), nameof(ReturnFalse)); QSBCore.HarmonyHelper.AddPrefix("OnSocketableDonePlacing", typeof(PoolPatches), nameof(ReturnFalse)); QSBCore.HarmonyHelper.AddPrefix("OnPedestalContact", typeof(PoolPatches), nameof(ReturnFalse)); QSBCore.HarmonyHelper.AddPrefix("FixedUpdate", typeof(PoolPatches), nameof(ReturnFalse)); QSBCore.HarmonyHelper.AddPrefix("OnSectorOccupantAdded", typeof(PoolPatches), nameof(ReturnFalse)); QSBCore.HarmonyHelper.AddPrefix("OnSectorOccupantRemoved", typeof(PoolPatches), nameof(ReturnFalse)); QSBCore.HarmonyHelper.AddPrefix("OnEntry", typeof(PoolPatches), nameof(ReturnFalse)); QSBCore.HarmonyHelper.AddPrefix("OnExit", typeof(PoolPatches), nameof(ReturnFalse)); } public override void DoUnpatches() { QSBCore.HarmonyHelper.Unpatch("Awake"); QSBCore.HarmonyHelper.Unpatch("Update"); QSBCore.HarmonyHelper.Unpatch("OnSocketableRemoved"); QSBCore.HarmonyHelper.Unpatch("OnSocketableDonePlacing"); QSBCore.HarmonyHelper.Unpatch("OnPedestalContact"); QSBCore.HarmonyHelper.Unpatch("FixedUpdate"); QSBCore.HarmonyHelper.Unpatch("OnSectorOccupantAdded"); QSBCore.HarmonyHelper.Unpatch("OnSectorOccupantRemoved"); QSBCore.HarmonyHelper.Unpatch("OnEntry"); QSBCore.HarmonyHelper.Unpatch("OnExit"); } public static bool ReturnFalse() => false; } }