Chemistry Set: match recipe ingredients by count - #148
Open
Eldrinn-Elantey wants to merge 1 commit into
Open
Conversation
Recipes with duplicate ingredients required each copy to sit in its own slot, and vanilla shift-click always merges into an existing stack instead, so the layout for web, fractured bones or the lengthening catalyst could not be produced by shift-clicking or by any kind of item pipe. Ingredients are now counted across the input slots, so a single stack of five string works just as well as five slots holding one each. Matching also accepted any superset of a recipe, leaving unrelated items in the slots unconsumed and making the outcome depend on the registration order. Every non-empty slot now has to be part of the recipe. Consumption used its own comparison rules that had drifted from the matching ones and could decrement a different slot than the one that was matched. Both now come from a single pass that returns the per-slot amounts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Recipes with duplicate ingredients required each copy to sit in its own slot, and vanilla shift-click always merges into an existing stack instead, so the layout for web, fractured bones or the lengthening catalyst could not be produced by shift-clicking or by any kind of item pipe. Ingredients are now counted across the input slots, so a single stack of five string works just as well as five slots holding one each.
Matching also accepted any superset of a recipe, leaving unrelated items in the slots unconsumed and making the outcome depend on the registration order. Every non-empty slot now has to be part of the recipe.
Consumption used its own comparison rules that had drifted from the matching ones and could decrement a different slot than the one that was matched. Both now come from a single pass that returns the per-slot amounts, which also fixes a stack of two container items collapsing into one empty container.
The one-item-per-slot layout keeps working, so existing setups stay valid.
Checklist