Disentangle activation and consumption
Summary
Infrastructure "Disentangle eat and activate for food"
Purpose of change
Potential fix for #76414
Describe the solution
-
Eat only eats food and doesn't check for activation
-
Activate only activates and doesn't look for eating
-
Drugs don't show in the activate menu, only in the consumption menu
-
Pet food remains a special case as it can be eaten and activated to do 2 different things
-
Make ALCOHOL a flag instead of a use action which should simplify a little bit the rest of #83668 but will still need to be removed later
-
Add NO_AUTO_CONSUME flag to some alcoholic drink that didn't have it [UNRELATED CHANGE]
Describe alternatives you've considered
Testing
- activate in progress food > it works
- activate in progress drugs > it works
- activate in progress mutagen > it works
- activate juvenile sourdough > you activate it
- Eat pet food to eat it
- Activate pet food to tame a pet
- eat 10 morphine > dies
- Eat corn cob > it disappears > get 99 kcal
- Eat 20 whisky > pass out
- Eat 1 whisky > get 79 kcal
- Eat dog food > get 450 kcal
- eat aspirin > get painkiller effect
Additional context
Drugs could do with their own menu
I like the approach, good luck on shaking out the cobwebs 👍
I am assuming this also breaks poison?
Not a comment on the actual content of the PR, but just want to point out that you misspelled disentangle so you don't get this published to the changelog with a typo in the title :)
I think the activate menu is less usable for drugs than the "eat" menu. It does not stay open, will not re-open to the same item last used, and the filter is vastly wider, with no way to filter for drugs specifically.
Iirc you cant "use" liquids, so liquid medicine (disinfectant) could only be applied by "eating" it. Not sure how to handle this other then allowing liquids to be "used"
What does this do to goblin fruit in XE? Will their effects apply on eating?
Yes, it should. The eat function in character.cpp still calls you.consume_effects( food ), which does all of the vitamins and nutrients and thirst and stomach volume and whatnot and also calls activate_consume_eocs( *this, food );. This activates whatever EOCs the food has.
All this patch does is make it so that you cannot (a)ctivate food items, you can only (e)at them. It doesn’t change what happens when you eat things.