Add cheese & dough reactions (#5547)

* git mv

* rename CreateEntityReaction -> CreateEntityTileReaction

* cheese

* change microwave recipes

* remove unnecessary test

* TryGet->Get
This commit is contained in:
Leon Friedrich
2021-11-27 11:50:14 +13:00
committed by GitHub
parent 7ecd08b8ca
commit 61423be24e
14 changed files with 169 additions and 91 deletions

View File

@@ -1,43 +0,0 @@
using System.Threading.Tasks;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Kitchen;
using NUnit.Framework;
using Robust.Shared.Prototypes;
namespace Content.IntegrationTests.Tests.Kitchen
{
[TestFixture]
public class KitchenTest : ContentIntegrationTest
{
[Test]
public async Task TestRecipesValid()
{
var server = StartServer();
await server.WaitIdleAsync();
var protoManager = server.ResolveDependency<IPrototypeManager>();
await server.WaitAssertion(() =>
{
foreach (var recipe in protoManager.EnumeratePrototypes<FoodRecipePrototype>())
{
Assert.That(protoManager.HasIndex<EntityPrototype>(recipe.Result), $"Cannot find FoodRecipe result {recipe.Result} in {recipe.ID}");
foreach (var (solid, amount) in recipe.IngredientsSolids)
{
Assert.That(protoManager.HasIndex<EntityPrototype>(solid), $"Cannot find FoodRecipe solid {solid} in {recipe.ID}");
Assert.That(amount > 0, $" FoodRecipe {recipe.ID} has invalid solid amount of {amount}");
}
foreach (var (reagent, amount) in recipe.IngredientsReagents)
{
Assert.That(protoManager.HasIndex<ReagentPrototype>(reagent), $"Cannot find FoodRecipe reagent {reagent} in {recipe.ID}");
Assert.That(amount > 0, $" FoodRecipe {recipe.ID} has invalid reagent amount of {amount}");
}
Assert.That(recipe.CookTime > 0, $"Cook time of {recipe.CookTime} for FoodRecipe {recipe.ID} is invalid!");
}
});
}
}
}