quantum-space-buddies/QSB/EchoesOfTheEye/EclipseElevators/Patches/EclipseElevatorPatches.cs

20 lines
645 B
C#
Raw Normal View History

2022-03-16 13:48:43 +00:00
using HarmonyLib;
using QSB.EchoesOfTheEye.EclipseElevators.Messages;
using QSB.EchoesOfTheEye.EclipseElevators.WorldObjects;
using QSB.Messaging;
using QSB.Patches;
using QSB.WorldSync;
namespace QSB.EchoesOfTheEye.EclipseElevators.Patches;
internal class EclipseElevatorPatches : QSBPatch
{
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
[HarmonyPostfix]
2022-03-16 13:48:43 +00:00
[HarmonyPatch(typeof(ElevatorDestination), nameof(ElevatorDestination.OnPressInteract))]
public static void CallElevator(ElevatorDestination __instance) =>
__instance.GetWorldObject<QSBElevatorDestination>()
.SendMessage(new CallElevatorMessage());
2022-03-16 13:48:43 +00:00
}