Esempio n. 1
0
        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);
        }
Esempio n. 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("");
        }
Esempio n. 3
0
 public static string GetIngredientFromOrder(string order)
 {
     return(ItemUtil.GetIngredientsForOrder(order)[0]);
 }