public virtual bool Craft(ItemStorage materialStorage, ItemStorage destinationStorage) { if (CanBeCrafted(materialStorage) && destinationStorage.GetFreeSpace() >= Quantity) { destinationStorage.Add(Result, Quantity); foreach (var c in Costs) { materialStorage.Remove(c.Item, c.Count); } return(true); } return(false); }
public virtual bool Craft(ItemStorage i) { if (CanBeCrafted(i) && i.GetFreeSpace() >= Quantity) { i.Add(Result, Quantity); foreach (var c in Costs) { i.Remove(c.Item, c.Count); } return(true); } return(false); }