public static String GetIngredient(ServerIngredientContainer container) { String result = ""; Boolean flag = true; AssembledDefinitionNode[] containerContents = container.GetContents(); ArrayList contents = new ArrayList(); foreach (AssembledDefinitionNode node in containerContents) { ItemUtil.GetIngredientsInNode(node, contents); } foreach (String content in contents) { if (flag == true) { result = result + content; flag = false; } else { result = result + "+" + content; } } return(result); }
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); }