No lit cigs in inventory anymore, only in hands or in mouth #77834
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
Features "No lit cigs in inventory anymore, only in hands or in mouth"
Purpose of change
Describe the solution
Also some infrastructure work: simplified and updated "cig dies out" event by removing explicit item conversions (e.g.
cig_lit
tocig_butt
). Instead, addrevert_to
field to cigar, cigarette, and joint. If "cig dies out" event happens, convert cig to itsrevert_to
. If norevert_to
is defined, check fortarget
intransform
use_action and convert to thattarget
. This allows processing other smokable items which may be added in the future to vanilla or mods.Also changed displaying of interactions with cigs from
You take a puff of your cigarette (lit) (active).
toYou take a puff of your cigarette.
Describe alternatives you've considered
Instead of auto-extinguishing the cig when put into some container in inventory, make the cig react to that: add some chance for extinguish, some chance to set container (if flammable) and character on fire.
Testing
Got unlit cigarette in inventory. Activated it. My character automatically wore it.
Got unlit cigarette in hands. Activated it. My character automatically wore it.
Wielded worn lit cigarette. Cigarette was still lit.
Worn wielded lit cigarette. Cigarette was still lit.
Took off worn lit cigarette. My character automatically extinguished it and put in inventory.
Unwieded lit cigarette. My character automatically extinguished it and put in inventory.
Just in case: threw and dropped worn/wielded lit cigarettes to the ground. Cigarette was still lit.
Additional context
None.