Skip to content

Rework AbstractRecipeLogic#256

Merged
TechLord22 merged 10 commits intomasterfrom
abstractlogic-rework
Nov 26, 2021
Merged

Rework AbstractRecipeLogic#256
TechLord22 merged 10 commits intomasterfrom
abstractlogic-rework

Conversation

@TechLord22
Copy link
Copy Markdown
Member

This PR splits apart AbstractRecipeLogic into many more specialized methods, to allow for more fine-tuned control of machine behavior. The goal was to allow more core operations to be left intact without the need for any copy pasting, while allowing changes to still happen as freely as possible.

The PR also updates many RecipeLogics to use the new methods for cleanliness, including the EBF, Multismelter, Fusion Reactor, and Gas Collector.

@TechLord22 TechLord22 force-pushed the abstractlogic-rework branch 2 times, most recently from 5f38a61 to e5b8db7 Compare November 23, 2021 00:55
@serenibyss serenibyss added the status: high priority Issue or PR should be prioritized for reviews label Nov 23, 2021
Copy link
Copy Markdown
Member

@Yefancy Yefancy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it in the game and felt it worked the same as before. The changes are mostly to decouple, which looks good. If I have to say something that getRecipeMap() doesn't seem to be overridden either. It's a final field, so accessing the recipeMap directly I think is ok with the design specification.

@TechLord22
Copy link
Copy Markdown
Member Author

The reason for getRecipeMap() being changed is for a future PR, concerning recipelogic that deals with potentially more than one recipemap. An example of this is a multiblock that can switch the recipemaps it can use. Using a method instead of the field allows for a single override in this case, compared to otherwise many.

@TechLord22 TechLord22 merged commit ca3b974 into master Nov 26, 2021
@TechLord22 TechLord22 deleted the abstractlogic-rework branch November 26, 2021 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: high priority Issue or PR should be prioritized for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants