diff --git a/MiraAPI/Patches/VentPatches.cs b/MiraAPI/Patches/VentCanUsePatch.cs similarity index 78% rename from MiraAPI/Patches/VentPatches.cs rename to MiraAPI/Patches/VentCanUsePatch.cs index 2f8991d..b285411 100644 --- a/MiraAPI/Patches/VentPatches.cs +++ b/MiraAPI/Patches/VentCanUsePatch.cs @@ -8,17 +8,13 @@ using UnityEngine; namespace MiraAPI.Patches; /// -/// Vent patches to make sure the player is able to use the vent. +/// Used to change vent behaviour for the event system, custom roles, and modifiers. /// -[HarmonyPatch(typeof(Vent))] -public static class VentPatches +[HarmonyPatch(typeof(Vent), nameof(Vent.CanUse))] +internal static class VentCanUsePatch { - /// - /// CanUse patch. - /// - [HarmonyPostfix] - [HarmonyPatch(nameof(Vent.CanUse))] - public static void VentCanUsePostfix(Vent __instance, ref float __result, [HarmonyArgument(0)] NetworkedPlayerInfo pc, [HarmonyArgument(1)] ref bool canUse, [HarmonyArgument(2)] ref bool couldUse) + // ReSharper disable InconsistentNaming + public static void Postfix(Vent __instance, ref float __result, [HarmonyArgument(0)] NetworkedPlayerInfo pc, [HarmonyArgument(1)] ref bool canUse, [HarmonyArgument(2)] ref bool couldUse) { var @event = new PlayerCanUseEvent(__instance.Cast()); MiraEventManager.InvokeEvent(@event);