From 54378a55ecf173818baa534b030143a08331d701 Mon Sep 17 00:00:00 2001 From: Ciakon Date: Sat, 27 Apr 2024 13:32:54 +0200 Subject: [PATCH] L --- Assets/Scripts/Cooking.cs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Assets/Scripts/Cooking.cs b/Assets/Scripts/Cooking.cs index 4eda451..af77631 100644 --- a/Assets/Scripts/Cooking.cs +++ b/Assets/Scripts/Cooking.cs @@ -91,22 +91,22 @@ public class Cooking : MonoBehaviour DishesCooked.Add(BestDish); - - // Find used ingredients - List IngredientsInDish = BestDish.GetComponent().RequiredIngredients; - List UsedIngredients = new(); - List UnusedIngredients = new(); - - foreach (GameObject Ingredient in Ingredients) { - if (IngredientsInDish.Contains(Ingredient)) { - UsedIngredients.Add(Ingredient); - } - else { - UnusedIngredients.Add(Ingredient); - } - } - // old code + // // Find used ingredients + // List IngredientsInDish = BestDish.GetComponent().RequiredIngredients; + // List UsedIngredients = new(); + // List UnusedIngredients = new(); + + // foreach (GameObject Ingredient in Ingredients) { + // if (IngredientsInDish.Contains(Ingredient)) { + // UsedIngredients.Add(Ingredient); + // } + // else { + // UnusedIngredients.Add(Ingredient); + // } + // } + + //-------------------------------------- // // Remove ingredients and add the dish // foreach (GameObject Ingredient in UsedIngredients) {