-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Consume tool charges incrementally during crafting #31844
Merged
kevingranade
merged 3 commits into
CleverRaven:master
from
ifreund:craft-incremental-tools
Jun 30, 2019
Merged
Consume tool charges incrementally during crafting #31844
kevingranade
merged 3 commits into
CleverRaven:master
from
ifreund:craft-incremental-tools
Jun 30, 2019
Conversation
This file contains 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
ifreund
added
<Enhancement / Feature>
New features, or enhancements on existing
Crafting / Construction / Recipes
Includes: Uncrafting / Disassembling
[C++]
Changes (can be) made in C++. Previously named `Code`
<Bugfix>
This is a fix for a bug (or closes open issue)
labels
Jun 25, 2019
ifreund
force-pushed
the
craft-incremental-tools
branch
2 times, most recently
from
June 26, 2019 07:26
14cd4a5
to
7c141d7
Compare
Conflicts resolved |
Tool charges are now consumed before every 5% crafting progress, with the remainder consumed at the start of the craft.
Tool charges are now consumed incrementally and the relevant crafting tests need to be updated to reflect that. In particular, it is no longer sufficient to check tool charges after merely starting the craft; the activity must be completed.
I forgot to add serialization for `tools_to_continue` and `cached_tool_selections` which were added to `item` in a previous commit. This commit adds io support for `comp_selection` and properly serializes the new item members.
ifreund
force-pushed
the
craft-incremental-tools
branch
from
June 26, 2019 22:50
7c141d7
to
d70e1dd
Compare
I've seen a test failure that looks plausibly related to this
Something is causing a UI popup which isn't permitted in the tests because there's no one to respond to it. |
Certainly seems like it must be related, but I haven't been able to reproduce the failure locally. Does it happen every time for you or is it intermittent? |
This was referenced Jun 30, 2019
Only seen it once so far (out of maybe three test runs). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
<Bugfix>
This is a fix for a bug (or closes open issue)
[C++]
Changes (can be) made in C++. Previously named `Code`
Crafting / Construction / Recipes
Includes: Uncrafting / Disassembling
<Enhancement / Feature>
New features, or enhancements on existing
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: Bugfixes "Consume tool charges incrementally during crafting."
Purpose of change
Fixes #7126
Fixes #24230
Progress towards #29210 (getting very close to drastic craft time extension being feasible)
Describe the solution
Tool charges are now consumed before every 5% crafting progress,
with the remainder consumed at the start of the craft.
Describe alternatives you've considered
Rewriting a large portion of this code to make things cleaner. The way this is currently implemented feels more than a little hacky, but should work without issues.
Additional context
This may fix other old issues that I'm not aware of. If you know of any please add a comment so we can close them with this PR as well.