CleverRaven / CleverRaven/Cataclysm-DDA
Can't mix animal cooking oils - no explanation to user
- Dominant language
- C++
- Stars
- 13.1k
- Forks
- 4.6k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 200
Description
# Describe the bug
I have a 60L tank in a vehicle with 12.5L of animal cooking oil (extracted from bits of recently dead cow). I also have around 10L of animal cooking oil found in shops. I can't put the shop oil into the tank with the cow oil. Moreover, instead of a handy message like "Your religion forbids you mixing cow oil with shop oil" I get a debug error.
DEBUG : tried to put an item (cooking_oil2, amount 1) in a container (metal_tank) that cannot contain it
FUNCTION : int item::fill_with(const item&, int, bool, bool)
FILE : src/item.cpp
LINE : 8923
# Steps To Reproduce
1. Murder a cow, extract oil. Find a grocery, pick up jugs of oil. (Or load save [Narnia.zip](https://github.com/CleverRaven/Cataclysm-DDA/files/5900496/Narnia.zip) )
2. Try to place cow oil and shop oil in the same container.
3. Fail.
4. Observe error message.
# Expected behavior
We should be able to mix similar liquids (with the same name). With consequences.
https://github.com/CleverRaven/Cataclysm-DDA/issues/46091#issuecomment-748438592
Alternatively, users should be given an in-game explanation as to why they can't mix said liquids.
# Screenshots
# Versions and configuration
- OS: Windows x64 8.1
- Game Version: 0.E-9155-g1319073-dirty [64-bit]
- Graphics Version: Tiles
- Game Language: English [en]
- Mods loaded: [
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Bionic Professions [package_bionic_professions],
No Fungal Monsters [No_Fungi],
Stats Through Skills [StatsThroughSkills],
SpeedyDex [speedydex],
Stats Through Kills [stats_through_kills]
]
# Additional context
See related issues https://github.com/CleverRaven/Cataclysm-DDA/issues/46786 and https://github.com/CleverRaven/Cataclysm-DDA/issues/46470
Contributor guide
Research direction
Start in src/item.cpp at item::fill_with(), around line 8923, and review related issues 46091, 46786, and 46470. Reproduce the failed transfer using the provided Narnia.zip save or the listed steps, then determine whether the intended completion is same-name liquid mixing with consequences or an in-game explanation for rejection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100