CleverRaven / Cataclysm-DDA

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

Crafts not using up materials - Infinite crafts #40620

Open DillonSimeone opened 4 years ago

DillonSimeone commented 4 years ago

Describe the bug

EDIT: This bug seems to be affecting more than just the matchbook recipes mentioned in this summary! See comments below for another recipe affected this bug.

It appears that if you craft this recipe with matchbooks that have some of its charge spent, the whole book doesn't get used up. In the screenshots below, I started crafting with all of the matchheads I had (100 charges).

After that, I could craft using 80 charges of matchheads again and again forever without using up any charges.

I suspected that the 20 charges that disappeared was from a full matchbook, but after looking around in my vehicle, I discovered a bunch of full matchbooks. Maybe it's the only partially spent ones getting used up? 🤔

Might be related to #38909. I get that error message when crafting with the matchheads, but ignoring the message doesn't stop the crafting or break the game.

 DEBUG    : Item 'in progress match head powder (4) (0%)' with zero volume

 FUNCTION : int item::charges_per_volume(const volume&) const
 FILE     : src/item.cpp
 LINE     : 865

Steps To Reproduce

  1. Collect a bunch of matchhead books
  2. Use up some of the matchhead books halfway
  3. Start crafting matchhead powder for long as possible

Expected behavior

The matchbooks gets used up!

Screenshots

image image image image

This shows that I still have 80 charges left (After spamming the recraft last item a bunch of times above) image image

Versions and configuration

Additional context

Palmer Heights.zip mods.zip

DillonSimeone commented 4 years ago

I just noticed, it appears that I'm not using up any tainted flesh when crafting mutagens.

image

Start crafting... Finish, pour mutagens into gallon jugs. Start crafting another batch...

image

And look! 366 meat still!

Edit:

Just made another batch, none of the materials are getting used up!

image

DillonSimeone commented 4 years ago

Good lord. Now that I'm watching the numbers carefully... A lot of recipes seems to be affected! Possibly all of them! Zipping up my savefile and attaching it to this issue in case it's somehow just me.

DillonSimeone commented 4 years ago

Something seems strange here.

Mutagen is saying there's 366 chucks of tainted meat nearly. image

But this recipe says there's 462 chucks of tainted meat nearly.

image

🤔 Maybe there's so much stuff around that it's making my recipes to go wonky? Crafting more stuff to see what happens.

DillonSimeone commented 4 years ago

No idea why things isn't getting used up for SOME recipes. A bunch of recipes, like armor, weapons, electricians, etc seems to be using up materials. Most food recipes uses up materials, but I noticed that some didn't, like meat pie.

This is confusing.