Example #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;
         }
     }
 }
Example #2
0
 void DoorUse(Fougerite.Player p, DoorEvent de)
 {
 }
Example #3
0
 public void OnDoorUse(Player player, DoorEvent evt)
 {
     Invoke("On_DoorUse", player, evt);
 }
Example #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;
     }
 }
Example #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;
        }
Example #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);
     }
 }