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); }
public bool HasItems(Game_Pawn aPawn, Content_Inventory aItems) { if (aPawn.itemManager != null && !aItems.Empty()) { if (aItems.HasItemsInInventory(aPawn)) { return(true); } } return(false); }
public bool RemoveItems(Game_Pawn aPawn, Content_Inventory aItems) { if (aPawn.itemManager != null && aItems != null && !aItems.Empty()) { return(aItems.RemoveFromInventory(aPawn)); } else { return(false); } }
public bool GiveItems(Game_Pawn aPawn, Content_Inventory aItems) { Debug.LogWarning("GiveItems is not implemented", this); return(false); }