CleverRaven / Cataclysm-DDA

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

Deconstructing damaged steel frames does not produce lumps. #26899

Open strife26 opened 5 years ago

strife26 commented 5 years ago

Describe the bug
When attempting to deconstruct damaged steel frames, the game notifies the player that it's not guaranteed to recover components. However, it appears that the game treats lump of steel(10) as the results, not ten chances to recover a lump of steel. I've yet to successfully recover any material from a damaged frame. This results in damaged parts not being useful for recovering material.

To Reproduce
Steps to reproduce the behavior:

  1. Acquire damaged steel frames and required tools to deconstruct.
  2. Deconstruct frames.
  3. Note evaporation of any parts

Expected behavior
Some materials recovered from damaged frames, likely at a smaller but nonzero full recovery of 10 lumps. I'd imagine this problem might extent to other items that deconstruct into items with charges.

Versions and configuration(please complete the following information):

Pupsi-Mupsi commented 5 years ago

Tried to confirm the bug. Deconstruction seems to work fine. At least with my current build: Build 8232 (Tiles - Win x64) - 0.C-34877-g7bae86c (tiles)

Damaged Frame yields: grafik

BevapDin commented 5 years ago

@Pupsi-Mupsi did you uninstall the frame from a vehicle? That works correctly, but OP is most likely talking about disassembling an item (on the ground/in inventory) into its parts - the reverse of crafting it.

Pupsi-Mupsi commented 5 years ago

@Pupsi-Mupsi did you uninstall the frame from a vehicle? That works correctly, but OP is most likely talking about disassembling an item (on the ground/in inventory) into its parts - the reverse of crafting it.

I couldn't remember so I repeated both. Removing form vehicle worked fine.

Disassembling frames: Undamaged frame - Yield = 10 lump of steel Damaged |. frame - Yield = 10 lump of steel Damaged . frame - Yield = nothing

Sorry, definitely my mistake.

DragonWizard23 commented 9 months ago

@strife26 and @Pupsi-Mupsi I have repeated your tests in the latest experimental, and while steel frames now give 20 lumps of steel on disassembly, the game still treats it as an all or nothing situation. I'm not sure how to fix this but maybe someone else can. I think the crafting.cpp file line 2808 is important disassembly code and the steel frame recipe is stored in recipe_vehicle.json. Best of luck!

TealcOneill commented 4 months ago

/Invalid It's still an all or nothing situation but I think a separate feature request for damaged items since this bug is no longer applicable would be best.