Example #1
0
        public bool CanReceiveItems(Game_Pawn aPawn, Content_Inventory aItems)
        {
            int inv;
            int Count;

            if (aPawn.itemManager == null)
            {
                return(false);
            }
            Count = aItems.SlotCount();
            inv   = aPawn.itemManager.GetFreeSlots(Game_Item.EItemLocationType.ILT_Inventory);
            if (Count > inv)
            {
                //ApiTrace(GetCharacterName(aPawn) @ "has only"
                //@ string(inv)
                //@ "inventory slots available for"
                //@ string(Count)
                //@ "items");
                return(false);
            }
            //ApiTrace(GetCharacterName(aPawn) @ "has an"
            //@ string(inv)
            //@ "inventory slots available for"
            //@ string(Count)
            //@ "items");
            return(true);
        }
Example #2
0
 public bool HasItems(Game_Pawn aPawn, Content_Inventory aItems)
 {
     if (aPawn.itemManager != null && !aItems.Empty())
     {
         if (aItems.HasItemsInInventory(aPawn))
         {
             return(true);
         }
     }
     return(false);
 }
Example #3
0
 public bool RemoveItems(Game_Pawn aPawn, Content_Inventory aItems)
 {
     if (aPawn.itemManager != null && aItems != null &&
         !aItems.Empty())
     {
         return(aItems.RemoveFromInventory(aPawn));
     }
     else
     {
         return(false);
     }
 }
Example #4
0
 public bool GiveItems(Game_Pawn aPawn, Content_Inventory aItems)
 {
     Debug.LogWarning("GiveItems is not implemented", this);
     return(false);
 }