Fix invalid FoodRecipes and add test
This commit is contained in:
44
Content.IntegrationTests/Tests/Kitchen/KitchenTest.cs
Normal file
44
Content.IntegrationTests/Tests/Kitchen/KitchenTest.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System.Threading.Tasks;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.Prototypes.Kitchen;
|
||||
using NUnit.Framework;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.IntegrationTests.Tests.Kitchen
|
||||
{
|
||||
[TestFixture]
|
||||
public class KitchenTest : ContentIntegrationTest
|
||||
{
|
||||
[Test]
|
||||
public async Task TestRecipesValid()
|
||||
{
|
||||
var server = StartServerDummyTicker();
|
||||
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!");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2464,7 +2464,7 @@
|
||||
|
||||
- type: entity
|
||||
parent: FoodBase
|
||||
id: FoodToastedsandwich
|
||||
id: FoodToastedSandwich
|
||||
name: toasted sandwich
|
||||
description: Now if you only had a pepper bar.
|
||||
components:
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
reagents:
|
||||
chem.Flour: 5
|
||||
solids:
|
||||
MaskClown: 1
|
||||
ClothingMaskClown: 1
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeTofuBurger
|
||||
@@ -27,7 +27,7 @@
|
||||
reagents:
|
||||
chem.Flour: 15
|
||||
solids:
|
||||
Tofu: 1
|
||||
FoodTofu: 1
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeXenoburger
|
||||
@@ -39,26 +39,26 @@
|
||||
solids:
|
||||
FoodXenomeat: 1
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeSuperBiteBurger
|
||||
name: super bite burger recipe
|
||||
result: FoodSuperBiteBurger
|
||||
time: 20
|
||||
reagents:
|
||||
chem.Flour: 15
|
||||
chem.Salt: 5
|
||||
chem.Pepper: 5
|
||||
solids:
|
||||
FoodMeat: 5
|
||||
FoodCheeseWedge: 3
|
||||
FoodTomato: 4
|
||||
FoodEgg: 2
|
||||
#- type: microwaveMealRecipe
|
||||
# id: RecipeSuperBiteBurger
|
||||
# name: super bite burger recipe
|
||||
# result: FoodSuperBiteBurger
|
||||
# time: 20
|
||||
# reagents:
|
||||
# chem.Flour: 15
|
||||
# chem.Salt: 5
|
||||
# chem.Pepper: 5
|
||||
# solids:
|
||||
# FoodMeat: 5
|
||||
# FoodCheeseWedge: 3
|
||||
# FoodTomato: 4
|
||||
# FoodEgg: 2
|
||||
|
||||
#Breads & Sandwiches
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeBread
|
||||
name: bread recipe
|
||||
result: FoodContainerBread
|
||||
result: FoodBread
|
||||
time: 15
|
||||
reagents:
|
||||
chem.Flour: 15
|
||||
@@ -90,20 +90,20 @@
|
||||
FoodBreadSlice: 2
|
||||
FoodCheeseWedge: 1
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeBaguette
|
||||
name: baguette recipe
|
||||
result: FoodBaguette
|
||||
time: 10
|
||||
reagents:
|
||||
chem.Flour: 15
|
||||
chem.Salt: 1
|
||||
chem.Pepper: 1
|
||||
#- type: microwaveMealRecipe
|
||||
# id: RecipeBaguette
|
||||
# name: baguette recipe
|
||||
# result: FoodBaguette
|
||||
# time: 10
|
||||
# reagents:
|
||||
# chem.Flour: 15
|
||||
# chem.Salt: 1
|
||||
# chem.Pepper: 1
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeCreamCheeseBread
|
||||
name: cream cheese bread recipe
|
||||
result: FoodContainerCreamCheeseBread
|
||||
result: FoodCreamCheeseBread
|
||||
time: 20
|
||||
reagents:
|
||||
chem.Flour: 15
|
||||
@@ -113,7 +113,7 @@
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeBananaBread
|
||||
name: banana bread recipe
|
||||
result: FoodContainerBananaBread
|
||||
result: FoodBananaBread
|
||||
time: 25
|
||||
reagents:
|
||||
chem.Flour: 15
|
||||
@@ -128,7 +128,7 @@
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeMargheritaPizza
|
||||
name: margherita pizza recipe
|
||||
result: FoodContainerMargheritaPizza
|
||||
result: FoodMargheritaPizza
|
||||
time: 30
|
||||
reagents:
|
||||
chem.Flour: 10
|
||||
@@ -139,7 +139,7 @@
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeMushroomPizza
|
||||
name: mushroom pizza recipe
|
||||
result: FoodContainerMushroomPizza
|
||||
result: FoodMushroomPizza
|
||||
time: 25
|
||||
reagents:
|
||||
chem.Flour: 10
|
||||
@@ -149,7 +149,7 @@
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeMeatPizza
|
||||
name: meat pizza recipe
|
||||
result: FoodContainerMeatPizza
|
||||
result: FoodMeatPizza
|
||||
time: 30
|
||||
reagents:
|
||||
chem.Flour: 10
|
||||
@@ -161,7 +161,7 @@
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeVegetablePizza
|
||||
name: vegetable pizza recipe
|
||||
result: FoodContainerVegetablePizza
|
||||
result: FoodVegetablePizza
|
||||
time: 30
|
||||
reagents:
|
||||
chem.Flour: 10
|
||||
@@ -212,23 +212,23 @@
|
||||
FoodSpaghetti: 1
|
||||
FoodMeatball: 2
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeCrabSpaghetti
|
||||
name: crab spaghetti recipe
|
||||
result: FoodCrabSpaghetti
|
||||
time: 10
|
||||
reagents:
|
||||
chem.Water: 5
|
||||
solids:
|
||||
FoodCrabMeat: 2
|
||||
#- type: microwaveMealRecipe
|
||||
# id: RecipeCrabSpaghetti
|
||||
# name: crab spaghetti recipe
|
||||
# result: FoodCrabSpaghetti
|
||||
# time: 10
|
||||
# reagents:
|
||||
# chem.Water: 5
|
||||
# solids:
|
||||
# FoodCrabMeat: 2
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeCopypasta
|
||||
name: copypasta recipe
|
||||
result: FoodCopypasta
|
||||
time: 10
|
||||
solids:
|
||||
FoodPastaTomato: 2
|
||||
#- type: microwaveMealRecipe
|
||||
# id: RecipeCopypasta
|
||||
# name: copypasta recipe
|
||||
# result: FoodCopypasta
|
||||
# time: 10
|
||||
# solids:
|
||||
# FoodPastaTomato: 2
|
||||
|
||||
# - type: microwaveMealRecipe
|
||||
# id: RecipeMoMMISpaghetti
|
||||
@@ -239,53 +239,53 @@
|
||||
# chem.Flour: 5
|
||||
# solids:
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeRisotto
|
||||
name: risotto recipe
|
||||
result: FoodRisotto
|
||||
time: 10
|
||||
reagents:
|
||||
chem.Flour: 10 #This should be 10 units of rice.
|
||||
chem.Wine: 5
|
||||
solids:
|
||||
FoodCheeseWedge: 1
|
||||
#- type: microwaveMealRecipe
|
||||
# id: RecipeRisotto
|
||||
# name: risotto recipe
|
||||
# result: FoodRisotto
|
||||
# time: 10
|
||||
# reagents:
|
||||
# chem.Flour: 10 #This should be 10 units of rice.
|
||||
# chem.Wine: 5
|
||||
# solids:
|
||||
# FoodCheeseWedge: 1
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeBruschetta
|
||||
name: bruschetta recipe
|
||||
result: FoodBruschetta
|
||||
time: 10
|
||||
reagents:
|
||||
chem.Flour: 10
|
||||
chem.Salt: 2
|
||||
solids:
|
||||
FoodGarlic: 1
|
||||
FoodCheeseWedge: 1
|
||||
FoodTomato: 1
|
||||
#- type: microwaveMealRecipe
|
||||
# id: RecipeBruschetta
|
||||
# name: bruschetta recipe
|
||||
# result: FoodBruschetta
|
||||
# time: 10
|
||||
# reagents:
|
||||
# chem.Flour: 10
|
||||
# chem.Salt: 2
|
||||
# solids:
|
||||
# FoodGarlic: 1
|
||||
# FoodCheeseWedge: 1
|
||||
# FoodTomato: 1
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeQuiche
|
||||
name: quiche recipe
|
||||
result: FoodQuiche
|
||||
time: 10
|
||||
solids:
|
||||
FoodBlueTomato: 1
|
||||
FoodGarlic: 1
|
||||
FoodEgg: 1
|
||||
FoodCheeseWedge: 1
|
||||
#- type: microwaveMealRecipe
|
||||
# id: RecipeQuiche
|
||||
# name: quiche recipe
|
||||
# result: FoodQuiche
|
||||
# time: 10
|
||||
# solids:
|
||||
# FoodBlueTomato: 1
|
||||
# FoodGarlic: 1
|
||||
# FoodEgg: 1
|
||||
# FoodCheeseWedge: 1
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeLasagna
|
||||
name: lasagna recipe
|
||||
result: FoodLasagna
|
||||
time: 15
|
||||
#- type: microwaveMealRecipe
|
||||
# id: RecipeLasagna
|
||||
# name: lasagna recipe
|
||||
# result: FoodLasagna
|
||||
# time: 15
|
||||
# reagents:
|
||||
# chem.TomatoJuice: 15
|
||||
solids:
|
||||
FoodFlatDough: 2
|
||||
FoodMeat: 2
|
||||
FoodEggplant: 1
|
||||
FoodCheeseWedge: 1
|
||||
# solids:
|
||||
# FoodFlatDough: 2
|
||||
# FoodMeat: 2
|
||||
# FoodEggplant: 1
|
||||
# FoodCheeseWedge: 1
|
||||
|
||||
#Soups & Stew
|
||||
- type: microwaveMealRecipe
|
||||
@@ -300,29 +300,29 @@
|
||||
FoodCarrot: 1
|
||||
FoodPotato: 1
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeNettleSoup
|
||||
name: nettle soup recipe
|
||||
result: FoodNettleSoup
|
||||
time: 10
|
||||
reagents:
|
||||
chem.Water: 10
|
||||
solids:
|
||||
FoodNettle: 1
|
||||
FoodEgg: 1
|
||||
FoodPotato: 1
|
||||
#- type: microwaveMealRecipe
|
||||
# id: RecipeNettleSoup
|
||||
# name: nettle soup recipe
|
||||
# result: FoodNettleSoup
|
||||
# time: 10
|
||||
# reagents:
|
||||
# chem.Water: 10
|
||||
# solids:
|
||||
# FoodNettle: 1
|
||||
# FoodEgg: 1
|
||||
# FoodPotato: 1
|
||||
|
||||
#Other
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeMeatSteak
|
||||
name: meat steak recipe
|
||||
result: FoodMeatSteak
|
||||
time: 10
|
||||
reagents:
|
||||
chem.Salt: 1
|
||||
chem.Pepper: 1
|
||||
solids:
|
||||
FoodMeat: 1
|
||||
#- type: microwaveMealRecipe
|
||||
# id: RecipeMeatSteak
|
||||
# name: meat steak recipe
|
||||
# result: FoodMeatSteak
|
||||
# time: 10
|
||||
# reagents:
|
||||
# chem.Salt: 1
|
||||
# chem.Pepper: 1
|
||||
# solids:
|
||||
# FoodMeat: 1
|
||||
|
||||
- type: microwaveMealRecipe
|
||||
id: RecipeMisoColaSoup
|
||||
|
||||
Reference in New Issue
Block a user