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;
|
|
|
|
|
|
2022-03-18 09:04:24 +00:00
|
|
|
|
[HarmonyPostfix]
|
2022-03-16 13:48:43 +00:00
|
|
|
|
[HarmonyPatch(typeof(ElevatorDestination), nameof(ElevatorDestination.OnPressInteract))]
|
2022-03-18 09:04:24 +00:00
|
|
|
|
public static void CallElevator(ElevatorDestination __instance) =>
|
|
|
|
|
__instance.GetWorldObject<QSBElevatorDestination>()
|
|
|
|
|
.SendMessage(new CallElevatorMessage());
|
2022-03-16 13:48:43 +00:00
|
|
|
|
}
|