public bool AddItemToInventory(IItem item) { var selectedStack = GetStackForItem(item); var successful = selectedStack?.AddItem(item); if (!successful.HasValue || !successful.Value) { return(false); } ItemPickup?.Invoke(item); return(true); }
public bool AddItemToInventory(IItem item) { var selectedStack = GetStackForItem(item); var successful = selectedStack?.AddItem(item); if (!successful.HasValue || !successful.Value) { return(false); } ItemPickup?.Invoke(item); return(true); }