using OWML.ModHelper.Events; using QSB.Events; using QSB.Patches; namespace QSB.ElevatorSync { public class ElevatorPatches : QSBPatch { public override QSBPatchTypes Type => QSBPatchTypes.OnModStart; public static void StartLift(Elevator __instance) { var isGoingUp = __instance.GetValue("_goingToTheEnd"); var id = ElevatorManager.Instance.GetId(__instance); GlobalMessenger.FireEvent(EventNames.QSBStartLift, id, isGoingUp); } public override void DoPatches() { QSBCore.Helper.HarmonyHelper.AddPostfix("StartLift", typeof(ElevatorPatches), nameof(StartLift)); } } }