Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Disassembling a crafted Handcrank Charger should not give you Superglue back

Open estebandellasilva opened this issue 4 years ago • 11 comments

Describe the bug

Crafted a Handcrank Charger - to learn the recipe and to level up electronics Afterwards i wanted to disassmble it. I even got the superglue back that was used in the creation

Gonna Check if this behaviour iss reproduceable with other crafting recipes

Steps To Reproduce

  1. Create a Player and get all the ressources needed to craft a Handcrank Charger
  2. Craft a Handcrank Charger
  3. Disassemble Charger

Expected behavior

Once you craft something with superglue - you should not be able to get it back from disassembly

Screenshots

No response

Versions and configuration

Build 2021-08-27-0643

Additional context

No response

estebandellasilva avatar Aug 28 '21 19:08 estebandellasilva

I suggest a "disassembly results blacklist" - a list of things that you shouldn't get back from an automatically-derived disassembly recipe.

actual-nh avatar Aug 28 '21 21:08 actual-nh

Seems like this is only happening with crafted items.

изображение

The first hand-crank charger (weapon held) was crafted, and I indeed can get a superglue from disassembling it. The second charger (in yellow rectangle) is debug-spawned, and there is no superglue.

Night-Pryanik avatar Feb 05 '22 15:02 Night-Pryanik

@esotericist You added this item to the game in #30378. Do you know why there is a discrepancy in materials betw/ the debug & crafted versions of the item??

LeahLuong avatar Feb 06 '22 05:02 LeahLuong

It's not a disrepancy in materials - its the fact that generally, uncrafting something returns what you made it out of.

Zireael07 avatar Feb 06 '22 09:02 Zireael07

@Zireael07 Night-Pryanik's screenshot above shows superglue missing from the disassembly yield in the debug version. How is that not a discrepancy??

LeahLuong avatar Feb 07 '22 00:02 LeahLuong

Recipe authors are not generally the right person to ask about this kind of systemic issue, and please don't ping people to help you troubleshoot issues.

kevingranade avatar Feb 07 '22 03:02 kevingranade

https://github.com/CleverRaven/Cataclysm-DDA/blob/7ba05c95d6819fe4589777b97e1ff8dee3214695/src/requirements.cpp#L1226-L1234

The code to remove unrecoverable components (which have UNRECOVERABLE flag) while disassembling stuff, such as superglue, seems to be working right, but only for non-crafted versions of items.

We only need to find out what's the difference between crafted and non-crafted versions that cause that code snippet to fail.

Night-Pryanik avatar Feb 07 '22 03:02 Night-Pryanik

https://github.com/CleverRaven/Cataclysm-DDA/blob/7ba05c95d6819fe4589777b97e1ff8dee3214695/src/requirements.cpp#L1226-L1234

The code to remove unrecoverable components (which have UNRECOVERABLE flag) while disassembling stuff, such as superglue, seems to be working right, but only for non-crafted versions of items.

We only need to find out what's the difference between crafted and non-crafted versions that cause that code snippet to fail.

Maybe the easiest (and stupid) Solution would be for items which cant be recovered to not show up in the parts that its created from - what i dont know if this can be generally applicable (for glue it works, but other fluids this could be on depended on certain factors)

estebandellasilva avatar Feb 07 '22 21:02 estebandellasilva

Still an issue in 04ce720. image image

misterprimus avatar Dec 09 '22 04:12 misterprimus

https://github.com/CleverRaven/Cataclysm-DDA/blob/7ba05c95d6819fe4589777b97e1ff8dee3214695/src/requirements.cpp#L1226-L1234

The code to remove unrecoverable components (which have UNRECOVERABLE flag) while disassembling stuff, such as superglue, seems to be working right, but only for non-crafted versions of items. We only need to find out what's the difference between crafted and non-crafted versions that cause that code snippet to fail.

Maybe the easiest (and stupid) Solution would be for items which cant be recovered to not show up in the parts that its created from - what i dont know if this can be generally applicable (for glue it works, but other fluids this could be on depended on certain factors)

Did you ever figure this out? If I had to guess it's because spawned items use the JSON construction recipe and run it through the correct unrecoverable code checking section whereas crafted recipe look at the actual components used (some things like RV kitchen can use either a copper pot or steel pot) to craft that particular item when deconstructing.

misterprimus avatar Jan 05 '23 03:01 misterprimus

/Invalid Closed by #64102

TealcOneill avatar May 23 '24 21:05 TealcOneill

@TealcOneill just FYI "this has been fixed" is not invalid, but the comment reminding us that it can be closed is very much appreciated.

kevingranade avatar Jun 18 '24 17:06 kevingranade

Apologies, I meant to tag issues like this invalid and then ping guardian once about it instead of pinging him for every issue. I'll avoid this in this future.

TealcOneill avatar Jun 19 '24 07:06 TealcOneill