Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StartPryingGateEventArgs"/> class.
 /// </summary>
 /// <param name="player"><inheritdoc cref="Player"/></param>
 /// <param name="scp096"><inheritdoc cref="Scp096"/></param>
 /// <param name="gate"><inheritdoc cref="Gate"/></param>
 /// <param name="isAllowed"><inheritdoc cref="IsAllowed"/></param>
 public StartPryingGateEventArgs(Scp096 scp096, Player player, PryableDoor gate, bool isAllowed = true)
 {
     Scp096    = scp096;
     Player    = player;
     Gate      = Door.Get(gate);
     IsAllowed = isAllowed;
 }
Exemplo n.º 2
0
        private static bool Prefix(PlayableScps.Scp096 __instance, PryableDoor gate)
        {
            if (__instance.Charging && __instance.Enraged && (!gate.TargetState /* && gate.doorType == Door.DoorTypes.HeavyGate */))
            {
                var ev = new StartPryingGateEventArgs(API.Features.Player.Get(__instance.Hub.gameObject), gate);
                Exiled.Events.Handlers.Scp096.OnStartPryingGate(ev);
                return(ev.IsAllowed);
            }

            return(false);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StartPryingGateEventArgs"/> class.
 /// </summary>
 /// <param name="scp096">The Scp096 who is triggering the event.</param>
 /// <param name="gate">The gate to be pried open.</param>
 public StartPryingGateEventArgs(Player scp096, PryableDoor gate)
 {
     Player = scp096;
     Gate   = gate;
 }