From 9ebcd298c5ebd03288119974f2a2b3301fa24789 Mon Sep 17 00:00:00 2001 From: Yamato Date: Tue, 24 Dec 2024 13:46:11 +0100 Subject: [PATCH] InteractingElevator::IsCalledFromInside --- .../EventArgs/Player/InteractingElevatorEventArgs.cs | 11 ++++++++++- .../Patches/Events/Player/InteractingElevator.cs | 10 ++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/EXILED/Exiled.Events/EventArgs/Player/InteractingElevatorEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/InteractingElevatorEventArgs.cs index b8bda532d..5a3edb3ad 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/InteractingElevatorEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/InteractingElevatorEventArgs.cs @@ -28,14 +28,18 @@ public class InteractingElevatorEventArgs : IPlayerEvent, IDeniableEvent /// /// /// + /// + /// + /// /// /// /// - public InteractingElevatorEventArgs(Player player, ElevatorChamber elevator, bool isAllowed = true) + public InteractingElevatorEventArgs(Player player, ElevatorChamber elevator, bool isCalledFromInside, bool isAllowed = true) { Player = player; Lift = Lift.Get(elevator); Elevator = elevator; + IsCalledFromInside = isCalledFromInside; IsAllowed = isAllowed; } @@ -54,6 +58,11 @@ public InteractingElevatorEventArgs(Player player, ElevatorChamber elevator, boo /// public bool IsAllowed { get; set; } + /// + /// Gets a value indicating whether the player as interact with the elevator from the inside. + /// + public bool IsCalledFromInside { get; } + /// /// Gets the player who's interacting with the elevator. /// diff --git a/EXILED/Exiled.Events/Patches/Events/Player/InteractingElevator.cs b/EXILED/Exiled.Events/Patches/Events/Player/InteractingElevator.cs index f98ed131c..39382fd68 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/InteractingElevator.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/InteractingElevator.cs @@ -55,10 +55,13 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable