public static ArrayList GetIngredientContainerContents(GameObject gameObject)
        {
            ServerIngredientContainer serverIngredientContainer = gameObject.GetComponent <ServerIngredientContainer>();

            AssembledDefinitionNode[] plateContents = serverIngredientContainer.GetContents();

            //Logger.Log($"Plate contents size: {plateContents.Length}");

            ArrayList contents = new ArrayList();

            foreach (AssembledDefinitionNode node in plateContents)
            {
                ItemUtil.GetIngredientsInNode(node, contents);
            }

            return(contents);
        }
Beispiel #2
0
        public static string GetRemainingIngredientFromOrder(string order, List <string> ingredients)
        {
            List <string> ingredientsList = new List <string>();

            ingredientsList.AddRange(ingredients);
            string[] orderIngredients = ItemUtil.GetIngredientsForOrder(order);

            foreach (string ingredient in orderIngredients)
            {
                if (!ingredientsList.Contains(ingredient))
                {
                    return(ingredient);
                }
                ingredientsList.Remove(ingredient);
            }

            return("");
        }
Beispiel #3
0
 public static string GetIngredientFromOrder(string order)
 {
     return(ItemUtil.GetIngredientsForOrder(order)[0]);
 }