Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[CR]Nested crafting requirements #17435
Conversation
Coolthulhu
added some commits
Jun 30, 2016
This comment has been minimized.
This comment has been minimized.
|
This looks like a duplication of the |
This comment has been minimized.
This comment has been minimized.
|
Couldn't find a way to do it with |
This comment has been minimized.
This comment has been minimized.
|
What would the ideal syntax look like? |
This comment has been minimized.
This comment has been minimized.
|
It needs to allow inlining requirements in the very last level. That is THE most important requirement of requirements. For example,
|
This comment has been minimized.
This comment has been minimized.
|
That would be |
This comment has been minimized.
This comment has been minimized.
|
How about translating:
EDIT: Also, in your example above, there is no copper wire. |
This comment has been minimized.
This comment has been minimized.
|
I entirely agree your version is less limiting but it's also more complexity and we already have support almost implemented for My concern is that this is going to make refactoring crafting to support In your above example what happens if I add a tool |
This comment has been minimized.
This comment has been minimized.
I still can't think of how to implement the use cases I listed above with If this use case can't be handled, then the 95% applies to cases
It wouldn't, really. I wrote it with templates where applicable (tool vs component was a problem). In fact, I tried to make it as generic as possible.
Currently it will complain and then break. I used the |
This comment has been minimized.
This comment has been minimized.
|
Do you have a better idea on how to do that? |
This comment has been minimized.
This comment has been minimized.
|
Nesting is important but I think now equally if not more important is to be able to combine for example The crafting code is horrible so it was a good idea to split this PR into a refactor and extension part.
If we're going to rewrite crafting it should be nested and also support arbitrary combinations. |
This comment has been minimized.
This comment has been minimized.
You mean something like unifying all 3 types of components? |
This comment has been minimized.
This comment has been minimized.
Yes, it's the last major piece of the puzzle |
This comment has been minimized.
This comment has been minimized.
|
A simpler solution that doesn't become obsolete with further changes is to allow recipes to accept an |
This comment has been minimized.
This comment has been minimized.
Item groups are bad with multiplicity. |
This comment has been minimized.
This comment has been minimized.
|
They could be tagged with a |
Coolthulhu commentedJun 30, 2016
Includes #17434
Currently a bit hacky due to a type id "cast" that is removed at finalization.
Allows extracting crafting components and tools to a non-inlined requirement.
As an example, I modified the granola recipe to use a new "fruit_sweet" requirement instead of a long list of sweet fruit.
Supports multiplication of requirements.
Currently only supports inlining the requirements in the last array of the vector. That is, it only allows alternative components.
For example, you can list a list of fruits to use in granola, have alternative bread types for sandwich, but can't have one inlined requirement contain both "any kind of bread" and "butter or peanut butter" - the recipe would need to list those two separately.