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.
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
Craft Gui show amounts #43393
Craft Gui show amounts #43393
Changes from 3 commits
194eceb
3bb94a3
a129fc8
e127c08
1a88d6c
2494b72
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think just "Nearby" is a little ambiguous, and there's certainly space in the UI to clarify a little more. I'm not sure how best to tweak it; maybe "Already present nearby: %s" or "There are already %s nearby"?
Also, it seems like the
color_cyan
tag is redundant here; there's always another colour inside it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cyan tag is a result of me not paying attention to copy and paste when I rewrote it.
I struggled with what the label should be but ended up deciding to be as general as possible because I didn't want to get caught up with amount/charges/portions discrepancies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to at least make it clear that it's the recipe output that's being counted here, otherwise it's just an arbitrary number without context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely we already have a function that can do this? Can't you use the code already used to look for crafting ingredients, asking for 9000 of whatever item. Since there's feedback in the UI about how many items you have when you're short, it must be returning that partial count.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spent some time looking around and while there were a couple I could theoretically use, they all seemed to be either threshold driven (has_components) or, charges vs amounts specific (visitable amount_of, charges_of). Since I would have to write a wrapper to use those anyways, I figured it would be better to just write a function that did what I wanted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a threshold-driven one might be a good option. As you already pointed out, you don't need to count all when there are many.