Pretty up the microwave menu, add click sounds. Remove some unnecessary ToList() calls. Remove unnecessary IoC resolves.

This commit is contained in:
FLOZ
2020-05-04 13:54:54 -04:00
parent c34081c514
commit 4034458d26
5 changed files with 55 additions and 36 deletions

View File

@@ -24,29 +24,17 @@ namespace Content.Shared.Kitchen
Recipes.Sort(new RecipeComparer());
}
private class RecipeComparer : IComparer<FoodRecipePrototype>
private class RecipeComparer : Comparer<FoodRecipePrototype>
{
int IComparer<FoodRecipePrototype>.Compare(FoodRecipePrototype x, FoodRecipePrototype y)
public override int Compare(FoodRecipePrototype x, FoodRecipePrototype y)
{
if (x == null || y == null)
{
return 0;
}
if (x.IngredientsReagents.Count < y.IngredientsReagents.Count)
{
return 1;
}
if (x.IngredientsReagents.Count > y.IngredientsReagents.Count)
{
return -1;
}
return 0;
return -x.IngredientsReagents.Count.CompareTo(y.IngredientsReagents.Count);
}
}
}
}