New JSON recipe property for overriding inheritance of specified flags #35825
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
SUMMARY: Infrastructure "New JSON recipe property for overriding inheritance of specified flags"
Purpose of change
My initial incarnation of flag inheritance included an item flag that completely disabled flag inheritance when that item was crafted. In retrospect, that was a poor solution. It is too heavy-handed in practice. For instance, it doesn't allow recipes to inherit one flag as normal, while removing another. This solution should be more practical.
Describe the solution
Adds an optional property to recipes,
delete_flags
, which is an array of strings. Flags specified there will be removed from the resultant item upon crafting. This will override flag inheritance, but will not delete flags that are part of the item type itself.Additionally, since this new property does everything that the old "NO_CRAFT_INHERIT" flag did and more, I removed that flag and all usage of it, and translated those usages to the new system.
Describe alternatives you've considered
Testing
Additional context