-
Notifications
You must be signed in to change notification settings - Fork 74
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
Choose the first DOABLE pattern when requesting autocrafting #499
Comments
Why not just remove unwanted secondary outputs when creating patterns? |
Because:
Water was just a bad example, the actual situation might be 10 times more complicated than what's been described above. Anyway the on-demand autocrafting is supposed to get things going, but not block you for some reason when you can actually press start, so when it comes to this, remove unwanted secondary outputs when creating patterns should only be a decent workaround but not an once-and-for-all solution. |
Not considering every possible recipe for a particular thing and stopping on the first discovered pattern is an optimization in crafting tree generation. The algorithm gets vastly more complex and slower if you have to consider combinations and have to pick which is the most optimal solution rather than arriving at a single valid solution where you either have the materials for it or you don't. |
Generate crafting tree on client and validate it on server? |
No need to explain it with bunches of words. See this:
For example you want to craft some Ice cubes, which consumes buckets of water, but there are multiple patterns having water coded as its output.
Now:
Pattern 1, Priority 0, Missing components
Pattern 2, Priority 0, Sufficient components
Pattern 3, Priority 100, Sufficient components
It chooses Pattern 3, which is good.
But if we disconnect its Interface, it chooses Pattern 1.
iirc it respects where the Interfaces are at in the network and their priority settings, but it should also calculate to see if you can actually hit the button.
damn it sounds performance heavy.
The text was updated successfully, but these errors were encountered: