Chef update (#11189)

* Sort recipes based on total ingredient count

Fix the recipe sort function so that recipes with more ingredients are
matched first. This fixes vegetable pizzas and allows more complex
recipes in the future.

* Chef update

* Pet linter
This commit is contained in:
Kevin Zheng
2022-09-10 18:47:37 -07:00
committed by GitHub
parent 9c5b9f4fec
commit c723d54a51
11 changed files with 780 additions and 175 deletions

View File

@@ -45,7 +45,9 @@ namespace Content.Shared.Kitchen
return 0;
}
return -x.IngredientsReagents.Count.CompareTo(y.IngredientsReagents.Count);
var nx = x.IngredientCount();
var ny = y.IngredientCount();
return -nx.CompareTo(ny);
}
}
}