-
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
Advanced Ecig Fix #26491
Advanced Ecig Fix #26491
Conversation
Makes using an advanced ecig mirror the comestible affects or a regular ecig after consuming a charge of nicotine liquid.
Suggested change: p->consume_effects( item( "ecig", it->birthday() ) ); |
Co-Authored-By: Karthas077 <Karthas077@users.noreply.github.com>
Two things - Two: I'd actually rather NOT use the birthday of the advanced electronic cigarette as the birthday of the dummy cigarette in the event that someone makes the basic ones expire (which, as a comestible, they could easily do and is something that would happen in real life). If anything, I'd prefer to use the birthday of the nicotine_liquid, but have no clue how to go about trying to get the birthday of a non-perishable liquid in a container in the player's inventory. |
Summary
SUMMARY: Bugfixes "Implements functionality for existing Advanced Electronic Cigarette"
Purpose of change
Fixes #20830 - Addiction mechanics are currently tied to comestibles and the Advanced Electronic Cigarette, as a tool, was unable to apply stimulant or addiction effects without a major rework.
Describe the solution
By creating a dummy ecig within iuse::ecig, the game is able to use the JSON from a regular Electronic Cigarette to trigger the appropriate consume_effects() without using a bunch of magic numbers or code duplication. Any changes to the behavior of a regular electronic cigarette should be automatically mirrored on the advanced one while preserving all functionality.
Describe alternatives you've considered
The ideal solution would be to embed the addiction effects into the nicotine_liquid directly and implement hooks for used TOOLS to trigger comestible style effects based on their AMMO. This would allow for variable concentrations in the nicotine_liquid as well as enable addiction for a few other stimulant delivery devices currently not being handled. As such this should be treated as a temporary fix until a more comprehensive solution can be implemented.
(Edited to fix the Summary line)