Skip to content
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

Rework representative recipes and category interactions #2525

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

krossgg
Copy link
Contributor

@krossgg krossgg commented Dec 10, 2024

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 or DataStickCopyScannerLogic.

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

@krossgg krossgg added the type: refactor Suggestion to refactor a section of code label Dec 10, 2024
@krossgg krossgg requested a review from a team as a code owner December 10, 2024 06:23
@krossgg krossgg merged commit c96ae44 into 1.20.1 Dec 10, 2024
4 checks passed
@krossgg krossgg deleted the kr/representatives branch December 10, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: refactor Suggestion to refactor a section of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants