Rework representative recipes and category interactions #2525
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
This PR modifies how custom Recipe Logics add representative recipes to XEI, as well as how a RecipeType's categoryMap is populated.
A representative recipe for the forming press's naming logic has also been added.
Implementation Details
Recipes are now no longer automatically added to their category upon construction, and instead need to manually be added. This is to not allow raw recipes from being added to the category map.
On the server, they are added when the recipe is added to the lookup. On the client, they are added when the recipe is deserialized.
Following this, any
ICustomRecipeLogic
implementations that wish to show representative recipes no longer need to return a list of these recipes. Instead, they should simply be built and added to the desired category.This is demonstrated in
FormingPressLogic
orDataStickCopyScannerLogic
.Outcome
XEI should no longer crash due to representative recipes.
Additional Information
Also fixed data generation not including optional compats due to not being on the extra sourceset