mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-11 00:52:19 +00:00
16 lines
491 B
C#
16 lines
491 B
C#
using OWML.ModHelper.Events;
|
|
using QSB.Events;
|
|
|
|
namespace QSB.ElevatorSync
|
|
{
|
|
public static class ElevatorPatches
|
|
{
|
|
public static void StartLift(Elevator __instance)
|
|
{
|
|
var isGoingUp = __instance.GetValue<bool>("_goingToTheEnd");
|
|
var direction = isGoingUp ? ElevatorDirection.Up : ElevatorDirection.Down;
|
|
GlobalMessenger<ElevatorDirection, string>.FireEvent(EventNames.QSBStartLift, direction, __instance.name);
|
|
}
|
|
}
|
|
}
|