Consistent UPS charge consumption when crafting #45781
Merged
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 "Consistent UPS charge consumption when crafting"
Purpose of change
Fixes #45330
Fixes #43054
Describe the solution
Multiple problems had to be addressed to fix this bug.
Describe alternatives you've considered
Testing
Full test program: no problems.
Tested crafting with arc welders and UPS in all possible combinations on the map and in inventory. Power consumption is consistent and reliable.
Tested stopping of craft, moving tools, and resuming. In certain situations such as moving tools from inventory to the map it will give a warning message message of missing charges and stop, but will resume correctly with a prompt for tool selection if the craft is attempted again. Power consumption is correct however and is only a minor inconvenience in a rare circumstance. To eliminate the message would require - in my opinion - prompting the player about tool usage with every resumption of a craft. This way is less intrusive.
Additional context