protected RecipeController GetRecipeToDisplay() { List <RecipeController> recipes = playerInventoryData.GetRecipes(); List <Dictionary <string, int> > recipeProgressList = new List <Dictionary <string, int> >(playerInventoryData.GetRecipeProgress()); Dictionary <Dictionary <string, int>, RecipeController> dInverse = new Dictionary <Dictionary <string, int>, RecipeController>(); for (int i = 0; i < recipeProgressList.Count; i++) { dInverse[recipeProgressList[i]] = recipes[i]; } recipeProgressList.Sort(closestToFinishFirst); return(dInverse[recipeProgressList[priority]]); }
public List <RecipeController> GetRecipes() { return(playerInventoryData.GetRecipes()); }