Пример #1
0
 public void On_DoorUse(Fougerite.Player player, Fougerite.Events.DoorEvent DoorEvent)
 {
     if (DataStore.GetInstance().ContainsKey("Doors", player.SteamID))
     {
         if (player.Admin)
         {
             DoorEvent.Open = true;
         }
     }
 }
Пример #2
0
 void DoorUse(Fougerite.Player p, DoorEvent de)
 {
 }
Пример #3
0
 public void OnDoorUse(Player player, DoorEvent evt)
 {
     Invoke("On_DoorUse", player, evt);
 }
Пример #4
0
 void DoorUse(Fougerite.Player p, DoorEvent de)
 {
     if (Core.IsEnabled() && !de.Open)
     {
         ShareCommand command = ChatCommand.GetCommand("share") as ShareCommand;
         ArrayList list = (ArrayList)command.GetSharedDoors()[de.Entity.OwnerID];
         if (list == null)
             de.Open = false;
         else if (list.Contains(p.PlayerClient.userID))
             de.Open = true;
         else
             de.Open = false;
     }
 }
Пример #5
0
        public static bool CheckOwner(DeployableObject obj, Controllable controllable)
        {
            try
            {
                DoorEvent de = new DoorEvent(new Entity(obj));
                if (obj.ownerID == controllable.playerClient.userID)
                    de.Open = true;

                if (!(obj is SleepingBag) && OnDoorUse != null)
                    OnDoorUse(Fougerite.Player.FindByPlayerClient(controllable.playerClient), de);
                return de.Open;
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
            }
            return false;
        }
Пример #6
0
 void OnDoorUse(Fougerite.Player param0, DoorEvent param1)
 {
     foreach (KeyValuePair<string, V8Plugin> plugin in plugins)
     {
         plugin.Value.Invoke("On_DoorUse", param0, param1); // Deprecated
         plugin.Value.Invoke("OnDoorUse", param0, param1);
     }
 }