public static Item Create(ConsumableType type,Actor a) { Item i = null; if(a.InventoryCount() < Global.MAX_INVENTORY_SIZE){ i = new Item(proto[type],-1,-1); a.GetItem(i); /*foreach(Item held in a.inv){ if(held.type == type && !held.do_not_stack){ held.quantity++; return held; } } a.inv.Add(i);*/ } else{ i = Create(type,a.row,a.col); } return i; }