CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.62k stars 4.17k forks source link

Uncraftable fried eggs when ingredients are in hide bag #47842

Closed TandemElephant closed 1 year ago

TandemElephant commented 3 years ago

Describe the bug

Attempting to craft fried eggs when contained in a hide bag results in two errors, depending on whether the hide bag is worn or not. No issue is present when ingredients are unloaded from the bag.

Steps To Reproduce

  1. Make a player with the following items & skills:
    • hide bag
    • eggs + animal cooking oil
    • frying pan (cooking equipment)
    • planks + lighter (tools for lighting fire)
    • food handling 2
  2. Light a fire.
  3. Wear hide bag, make sure all the ingredients are in it.
  4. Try crafting fried eggs, it is interrupted by an error message: Attempted a recipe with no available components!
  5. Drop hide bag with the ingredients still in it.
  6. Try crafting fried eggs, a strange prompt appears as if you were wielding the in-progress craft beforehand (screenshot 1).
    • Options 1 and 2 result in a prompt for missing ingredients (screenshot 2). Saying yes brings up the prompt again. Continuously pressing 'Y' eventually completes the craft, and only consumes the ingredients once.
    • Options 3 and 4 result in simply dropping the in-progress fried eggs (0%). Activating it results in the same behaviour as for options 1 and 2.

Expected behavior

Normal crafting of fried eggs.

Screenshots

strange_prompt

continuous_prompt

Versions and configuration

Additional context

RenechCDDA commented 1 year ago

Still valid! It's skipping checking the contents because the hide bag is itself a comestible, which means it's count by charges.

https://github.com/CleverRaven/Cataclysm-DDA/blob/05fe4bd44cdc39347ff09582ebf91c32db704ba2/src/item.cpp#L11884-L11885

Should be resolved by #60885