Beispiel #1
0
        public override void WalkInventory(OnInventorySlot handler)
        {
            IPlayer player = World.PlayerByUid(PlayerUID);

            foreach (InventoryBase inv in player.InventoryManager.Inventories.Values)
            {
                if (inv.ClassName == "creative")
                {
                    continue;
                }
                if (!inv.HasOpened(player))
                {
                    continue;
                }

                int q = inv.Count;
                for (int i = 0; i < q; i++)
                {
                    if (!handler(inv[i]))
                    {
                        return;
                    }
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// This walks the inventory for the entity agent.
 /// </summary>
 /// <param name="handler">the event to fire while walking the inventory.</param>
 public virtual void WalkInventory(OnInventorySlot handler)
 {
 }