CleverRaven / CleverRaven/Cataclysm-DDA

Liquid stacking homogenizes the container and potentially removes toxins

Open
#36,960 0 comments 1 reaction 0 assignees View on GitHub
<Bug> Items / Item Actions / Item Qualities
Dominant language
C++
Stars
13.1k
Forks
4.6k
Avg merge
2d 1h
Merged PRs (30d)
200

Description

# Describe the bug

Pouring a liquid that the game considers stack-able in the same container makes what is poured takes the exact same properties as what was already there. That's not a big deal when dealing with most liquids, as at most it means some change in vitamins for fruit juice and the like.

But with #36929 there's a liquid that have toxins and can stack with one that don't have it. Meaning that you can still purify mutant animal cooking oil by mixing it with even a single unit of normal cooking oil.

# Steps To Reproduce

1. Make oil from normal fat.
2. Make oil from mutant fat.
3. Mix one into the other.
4. Separate them both by pouring into smaller containers and see that whichever you poured into the other took the receiving oil's properties.

# Expected behavior

Expected mutant oil and normal oil not to be stackable. It may be just a matter of having it change names like other mutant animal products. On the other hand, if it can still stack after the name change, the fix will be more difficult: If liquids of the same type with even slightly different nutrition can't stack it will be a massive PITA to handle normal animal fat oil depending if it was made from raw fat, tallow or lard, not to mention juice and other liquid products.

One more sophisticated approach might be actually simulating the mixing and having the nutrition get averaged out. That also have the benefit of allowing the simulation of "cutting" a superior product with an inferior one, in particular, letting one make their animal oil stocks run longer by mixing mutant oil into it if they can't find normal animals to get fat from.

An easier option on the other hand might be just revert #36929 , remove mutant fat (and mutant tallow and mutant lard) from the animal cooking oil recipe, but to create an entirely new recipe for mutant cooking oil that isn't stack-able with normal animal cooking oil.

# Versions and configuration

- OS: Windows
- OS Version: 10.0 1903
- Game Version: 0.D-11235-g00699b2 [64-bit]
- Graphics Version: Tiles
- Mods loaded: [
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Aftershock [aftershock],
C.R.I.T Expansion Mod [crt_expansion],
Bens GF recipes [Tolerate_This],
Craftable Gun Pack [craftgp],
Garden Pots [growable-pots],
Gun Cotton [guncotton],
Makeshift Items Mod [makeshift],
Medieval and Historic Classes and Shields [Medieval_Stuff],
More Survival Tools [More_Survival_Tools],
DinoMod [DinoMod],
Hydroponics [hydroponics],
Mutant NPCs [mutant_npcs],
Folding Parts pack [deoxymod],
Vehicle Additions Pack [blazemod],
Roadheader and other mining vehicles [Heavy miners],
Tanks and Other Vehicles [Tanks],
No Explosive Zombies [No_Explosive_Zombies],
Manual Bionic Installation [manualbionicinstall],
Safe Autodoc [safeautodoc],
Stats Through Kills [stats_through_kills],
Stats Through Skills [StatsThroughSkills]
]

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with normal and mutant cooking oil, then trace the liquid stacking and property-handling entry points. Done should mean mixing or separating the oils no longer silently removes toxin properties, with the chosen behavior covered by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Domain
game-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.