-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a test to check that lathe recipes are possible #33868
Add a test to check that lathe recipes are possible #33868
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you merge master so we can check if the test is successful now that the recipe is fixed?
Also the AllLatheRecipesValidTest
should probably be moved from ResearchTest.cs
to the new Lathetest.cs
for better organisation.
Frontier has been looking at limiting lathe storage, so the bit that checks against storage limits could be helpful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Very useful PR, thanks!
About the PR
Adds an integration test that makes sure that lathes are able to accept the materials needed by all of their recipes.
Why / Balance
To avoid issues like #32206 coming up in the future.
Technical details
Note that this is going to fail on master currently! As reported in #32206, reinforced glass is listed in the autolathe, but the recipe calls for materials that can't be added to an autolathe. Until that is fixed, this test will fail. Edit: see #33876
The test works by checking each lathe and building a hashset of the materials it accepts (found by checking every material-containing entity against the lathe's storage whitelist). The recipes are then checked to make sure that they don't call for any materials that aren't accepted.
There's also a check to make sure that recipes don't call for a material quantity greater than the capacity of the lathe. No lathes currently have a storage limit, but it's a simple enough check that it doesn't hurt to add it.
Media
Requirements
Breaking changes
Changelog
Not player-facing, so nah.