public void AttachRecipe(CraftingRecipe recipeToAttach)
 {
     _attachedRecipe     = recipeToAttach;
     _recipeImage.sprite = recipeToAttach.ItemProduced.Item.Sprite;
 }
 public virtual void CancelProcess()
 {
     _processing = null;
     ResetTimer();
 }
 public virtual void AddProcess(CraftingRecipe recipe)
 {
     // Assign the new recipe and tell listeners about it
     _processing = recipe;
     OnStartProcess?.Invoke(recipe);
 }
 public void RegisterProduce(EditorItemStack itemProduced, CraftingRecipe recipe)
 {
     AddToDictionary(_produceRecipes, itemProduced.Item.Id, recipe);
 }
        private void AddToDictionary(Dictionary <ushort, List <CraftingRecipe> > dictionary, ushort itemId, CraftingRecipe recipe)
        {
            List <CraftingRecipe> recipesAssociatedWithItem;

            if (!dictionary.TryGetValue(itemId, out recipesAssociatedWithItem))
            {
                recipesAssociatedWithItem = new List <CraftingRecipe>();
                dictionary.Add(itemId, recipesAssociatedWithItem);
            }
            recipesAssociatedWithItem.Add(recipe);
        }
 public void RegisterProducedInside(ushort machineId, CraftingRecipe recipe)
 {
     AddToDictionary(_producedInsideOf, machineId, recipe);
 }