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:
Tayrtahn
2024-12-16 07:34:02 -05:00
committed by GitHub
parent 196782774b
commit cf738857fe
2 changed files with 132 additions and 20 deletions

View File

@@ -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();
}
}