cataclysmbnteam / Cataclysm-BN

Cataclysm: Bright Nights, A fork/variant of Cataclysm:DDA by CleverRaven.
https://docs.cataclysmbn.org
Other
662 stars 260 forks source link

Vehicle tanks claim to have twice as much liquid for crafting as actually available #3885

Open chaosvolt opened 9 months ago

chaosvolt commented 9 months ago

Describe the bug

Crafting from vehicle tanks claims there is twice as much liquid available as it should. If you attempt to craft more than what you actually have in the tank, it will error and halt your in-progress craft.

 DEBUG    : Attempted a recipe with no available components!

 FUNCTION : select_item_component
 FILE     : D:\a\Cataclysm-BN\Cataclysm-BN\src\crafting.cpp
 LINE     : 1460
 VERSION  : BN daf4002

Steps To Reproduce

  1. Spawn in a vehicle with a tank and a faucet installed on it.
  2. Fill that tank with a plastic bottle of water.
  3. Start to craft clean water, notice that it says you have 4 units avilable, not the 2 you put in the tank.
  4. Craft 2 units of clean water, tank empties as expected.
  5. Refill the tank with another bottle of water, this time try to make 4 clean water.
  6. Observe it bug out.

Screenshots

image

Versions and configuration

Additional context

No response

joveeater commented 9 months ago

I couldn't reproduce this. I tried spawning in an RV and adding a faucet before pouring 1 bottle of water in. The crafting interface showed I had 2 available.

chaosvolt commented 9 months ago

Huh, weird. I re-tested in the same save and I'm not able to reproducer it again either. I even installed a funnel on it like last time just in case that was a nessecary step I overlooked. I'm not sure what triggered it the first time.

chaosvolt commented 9 months ago

Wait no what the fuck. I moved around a bit and got rid of my unmounted water tank and it happened again with the tank I just tested in isolation: image

chaosvolt commented 9 months ago

Okay I've got a pure vanilla save here that has the problem. I installed the tank and (technically redundant) faucet directly on the kitchen unit and it worked fine, then I uninstalled it and moved the water tank to another space and suddenly the bug triggers: TEST.zip