Fix warnings and code cleanup/fixes (#13570)

This commit is contained in:
Visne
2023-01-19 03:56:45 +01:00
committed by GitHub
parent 3ca5a0224b
commit c6d3e4f3bd
265 changed files with 499 additions and 666 deletions

View File

@@ -1,4 +1,5 @@
using Robust.Shared.Prototypes;
using System.Linq;
using Robust.Shared.Prototypes;
namespace Content.Shared.Kitchen
{
@@ -21,19 +22,9 @@ namespace Content.Shared.Kitchen
/// <summary>
/// Check if a prototype ids appears in any of the recipes that exist.
/// </summary>
/// <param name="solidIds"></param>
/// <returns></returns>
public bool SolidAppears(string solidId)
{
foreach(var recipe in Recipes)
{
if(recipe.IngredientsSolids.ContainsKey(solidId))
{
return true;
}
}
return false;
return Recipes.Any(recipe => recipe.IngredientsSolids.ContainsKey(solidId));
}
private sealed class RecipeComparer : Comparer<FoodRecipePrototype>