Skip to content
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

Fix starting a fire with a firewood source #31256

Merged

Conversation

matthemsteger
Copy link
Contributor

Summary

SUMMARY: Bugfixes "Fix starting a fire with a firewood source"

Purpose of change

Fixes #31056 - Lighting Brazier won't pull from marked firewood source

Describe the solution

This was broken with #31002 which attempted to fix the problem with the previous logic where the charges were consumed prior to the activity finishing. The activity is complicated in that it runs through code to actually move fuel into the fire, and then check whether there is fuel there to continue. I delayed charge usage until the activity finished instead (which is done by several other activities) and added a comment. I also delayed the practice call and stored the possible number in the index field.

Describe alternatives you've considered

My first thought was to decouple the moving items with the notion of checking if there is fuel, but these methods are fairly complex and I did not want to duplicate that code and just delaying the taking of the charge until after the activity seemed better.

Additional context

There are some edge cases that are not accounted for, I suppose .. charges that should be taken even if interrupted.

src/iuse_actor.cpp Outdated Show resolved Hide resolved
Co-Authored-By: Anton Burmistrov <[email protected]>
@ZhilkinSerg ZhilkinSerg self-assigned this Jun 9, 2019
@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Character / Player Character / Player mechanics labels Jun 9, 2019
@ZhilkinSerg ZhilkinSerg merged commit 7bd9888 into CleverRaven:master Jun 9, 2019
@ZhilkinSerg ZhilkinSerg removed their assignment Jun 9, 2019
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` Mechanics: Character / Player Character / Player mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lighting Brazier won't pull from marked firewood source
3 participants