-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Asthmatic NPS doesn't receive his inhaler on the inhaler quest completion #31773
Comments
Also if an NPC is experiencing an asthma attack and is given an inhaler, he won't use it. |
I experienced the same behavior:
|
I recruited an asthmatic NPC after completing their inhaler mission and was startled to see they had already lost it. This allows them to keep the inhaler you find for them. Attempted fix for CleverRaven#31773. I have detailed some problems with this commit in comments on that issue.
I took a crack at fixing this today, and was stymied by an oddity in the mission handling, plus what looks like a bug in inventory transfer for the inhaler (and possibly other charged items). I got it mostly working, but tagged it WIP in the hopes someone can think of a better workaround to the issues I've described in the PR message: #37454 |
When using this function to sell an inhaler to an NPC, `u.has_charges` is (apparently) returning true (since player has inhaler charges), although the inhaler itself is not counted by charges according to @BevapDin. This change makes `set_u_sell_item` follow more closely the pattern of `set_u_buy_item`, by merging the two separate `if/else` blocks into one, handling both the charge adjustment and `p.i_add` to transfer them item. Most importantly, the first condition for doing charge-based adjustment is whether `count_by_charges()` is true. I've preserved the check for `u.has_charges`, because we need to ensure the requested number of charges are available. Partial fix for CleverRaven#31773
* Let asthmatic NPC keep inhaler after quest I recruited an asthmatic NPC after completing their inhaler mission and was startled to see they had already lost it. This allows them to keep the inhaler you find for them. Attempted fix for #31773. I have detailed some problems with this commit in comments on that issue. * Not take away all the player's inhalers This may be a case of the workaround being worse than what's being worked around. Will find a better solution. * Don't sell inhaler by individual charges When using this function to sell an inhaler to an NPC, `u.has_charges` is (apparently) returning true (since player has inhaler charges), although the inhaler itself is not counted by charges according to @BevapDin. This change makes `set_u_sell_item` follow more closely the pattern of `set_u_buy_item`, by merging the two separate `if/else` blocks into one, handling both the charge adjustment and `p.i_add` to transfer them item. Most importantly, the first condition for doing charge-based adjustment is whether `count_by_charges()` is true. I've preserved the check for `u.has_charges`, because we need to ensure the requested number of charges are available.
@wapcaplet is this fixed by #37454? |
@Night-Pryanik Yes, I believe it was. Thanks for bringing it to my attention. I tested it again in 0.E-10373 and can no longer reproduce it, so I am closing it now. |
Describe the bug
It just vanishes from the player's inventory, leaving the poor guy with his fate.
Expected behavior
NPC getting the inhaler in his inventory for later use.
Versions and configuration
The text was updated successfully, but these errors were encountered: