CleverRaven / CleverRaven/Cataclysm-DDA

flour is triggering grain-intolerance even when made from non-grain materials

Open
#52,226 7 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)
205

Description

### Describe the bug

We have a number of non-grain related sources of flour now - cattail rhizome, acorns, chestnuts, starch from potato or dalia roots, etc. However, the "flour" item seems to obtain material of "wheat" regardless of its components and is always marked as health hazard to eat. The item carries information about the components which it was created from, but this seems to be used only for the calories information and not for the material or other flags.

### Steps To Reproduce

1. Give yourself grain intolerance mutation
2. Get/spawn some roasted cattail rhizomes, make them into flour
3. Observe the red tag of the warning for health hazard food
4. Cook something with it, still has the same warning

### Expected behavior

I expect that the material, especially one linked to potential intolerances, will be inherited or obtained directly from the components in the item. This would allow people to make grain-free bread and other food that will not trigger their intolerances.

### Screenshots

![Screenshot from 2021-10-10 21-58-43](https://user-images.githubusercontent.com/25322782/136711739-e9f52a87-99e7-4eba-b60a-c185739f141b.png)
Three different types of flour made from wheat, cattail and chestnuts in that order.

### Versions and configuration

experimental, Linux, 208638b curses version

### Additional context

I am still trying to track down where the flags/materials get inherited from so any suggestion to where in the code I should look at is appreciated.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how flour is created from its components and how material or intolerance flags are assigned; the issue does not name specific files or tests. Reproduce the cattail, chestnut, and wheat flour cases with grain intolerance, and consider the work done when non-grain flour no longer receives the grain-intolerance warning while wheat flour still does.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.