Add a test to check that lathe recipes are possible (#33868)
* Add a test to check that all lathes accept the materials for all their recipesy * Add check for storage limit * Track total recipe material volume * Check dynamic and emag recipes too * Move AllLatheRecipesValidTest from ResearchTest to LatheTest * Extremely minor modernization
This commit is contained in:
@@ -98,24 +98,4 @@ public sealed class ResearchTest
|
||||
|
||||
await pair.CleanReturnAsync();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task AllLatheRecipesValidTest()
|
||||
{
|
||||
await using var pair = await PoolManager.GetServerClient();
|
||||
|
||||
var server = pair.Server;
|
||||
var proto = server.ResolveDependency<IPrototypeManager>();
|
||||
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
foreach (var recipe in proto.EnumeratePrototypes<LatheRecipePrototype>())
|
||||
{
|
||||
if (recipe.Result == null)
|
||||
Assert.That(recipe.ResultReagents, Is.Not.Null, $"Recipe '{recipe.ID}' has no result or result reagents.");
|
||||
}
|
||||
});
|
||||
|
||||
await pair.CleanReturnAsync();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user