CleverRaven / Cataclysm-DDA

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

Introduce a metal compactor appliance #56353

Closed PatrikLundell closed 1 year ago

PatrikLundell commented 2 years ago

Is your feature request related to a problem? Please describe.

0.F-0 had working metal compactors in the recycling centers and steel mills, and it was extremely useful. It no longer works in an experimental a week or two old, with the comment stating it doesn't work due to the power being gone (which is entirely reasonable, since the power is gone). It would be good to be able to regain the functionality.

Solution you would like.

The ability to disconnect/dismantle a metal compactor and rebuild it as an appliance in a convenient location.

Describe alternatives you have considered.

No response

Additional context

There are a few questions regarding the metal compactor:

  1. Is it too useful to be allowed?
  2. It's presumably rather bulky, and so might need to be dismantled into several parts rather than one.
  3. It's described as hydraulic, and so presumably would need some of that rather nasty hydraulic fluid. While some might be recovered during dismantling, it's not unreasonably to think you'd need to top it up (and used fluid might be contaminated).
  4. It presumably draws a lot of power when operating, and so might need a high power appliance grid.

This might be considered another instance of the things #53647 calls for.

Drew4484 commented 2 years ago

This is an oversimplification of what IRL is an entire building dedicated to recycling materials. An actual compactor makes the task you want to accomplish incredibly more difficult. Imagine you want to get platinum from a car. There's a few different places you can find it, so one option would be to tear the car apart and grab exactly what you want. The other option is to run the whole car through a processing facility that will chop it up, burn away most non-metal, use heat and magnets to separate what remains, and results in wasting quite a bit of material. Adding a compactor to the process makes both applications harder as you'll never tease parts out of a compact cube, you'll have to chop and melt the entire thing.

A more practical approach would be to leverage the labor of NPCs to sort and separate valuable materials, which they can already do with deconstruct zones.

PatrikLundell commented 2 years ago

The game compactor did what I don't think anything else in the game can do: turn otherwise useless items made out of useful materials into a form that can actually be used by recipes. This is particularly useful for aluminum, as repair of several items requires access to the rare aluminum ingots (I gave up using a survival headlamp because of this: it got damaged time and time again, and required an aluminum ingot to be repaired: that was too costly, so I switched to just regular headlamps that were thrown away when too damaged before the compactor was introduced. Aluminum ingots were rare, while flashlights and helmets were common).

I don't know how the implementation was done, but the game compactor rejected some items that weren't considered pure enough, so I guess it might use the material composition to determine what to accept and what not to. In addition to that, it only accepted like material, so you couldn't mix copper, gold, iron, and steel and compact that into a cube of mixed metal.

Thus, the game compactor operated on the dissembled item level, not the whole item level, although it certainly did gloss over a lot of real world complications, such as items not actually being pure in reality: tin cans have lining inside of them, pots usually have invisible handles made out of some plastic, aluminum item being covered by aluminum oxide, etc.

As you see, the game compactor was rather different from the real life item (or, rather, process). The input was single metal items all of the same metal while the output was 3? differently sized raw material items (ingots, scraps and chunks, or something like that), with the amount produced based on the amount placed in the machine.

You could introduce a labor intensive version of the process of turning useless single material metal items into usable "raw" material as (companion) blacksmith tasks, but I don't think the recipe system can be used unchanged as I think you have to specify each item or item category, and I don't think there are any item categories containing items made from single materials (let alone maintained ones). Thus, it would require new code to support that (and gigantic lists of eligible items in the crafting UI). I don't think the recipe logic can handle the output item types(s) being variable depending on the amount of the input either.

I-am-Erk commented 2 years ago

I think there could be a role for a device that converts metal items into scrap, but if we do that it might go along with requiring it for a lot of uncraft recipes. We'd need the opinion of someone who knows a bit about the materials in question. I don't think a generic metal compactor is sufficient.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.