CleverRaven / Cataclysm-DDA

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

Log wall camp expansions require angle grinder #74363

Open PavelZhd opened 3 weeks ago

PavelZhd commented 3 weeks ago

Describe the bug

Some camp expansions with log walls require angle grinder with charges. Currently noticed in modular camp version 2 main building during step 2 of initial shack construction and adding second room.

Attach save file

N/A

Steps to reproduce

  1. Get a follower.
  2. start modular camp
  3. Build first step of shack with log walls.
  4. Look at the tools requires to continue building shack walls with log wall.

Expected behavior

Angle grinder is not required to build log walls or wooden floor/roof.

Screenshots

Снимок экрана 2024-06-07 090807

Versions and configuration

Windows 10. Experimental 2024-06-03-2520

Additional context

My guess is the process of some expansions tries to tear down some previously built walls and then rebuild them, and fo that asks for a grinder.

PatrikLundell commented 3 weeks ago

/confirmed

It's caused by the selection of "t_floor" for the floor component, but I can't figure out why. I've hacked the palette to replace the various terrain components, and replacing "t_floor" with "t_dirt" in the palette causes the weird angle grinder requirement to go away. This is the recipe that should be used for the floor:

  {
    "type": "construction",
    "id": "constr_floor",
    "group": "build_floor_with_treated_roof",
    "category": "CONSTRUCT",
    "required_skills": [ [ "fabrication", 3 ] ],
    "time": "120 m",
    "qualities": [ [ { "id": "HAMMER", "level": 2 } ], [ { "id": "SAW_W", "level": 2 } ] ],
    "components": [ [ [ "wood_sheet", 1 ], [ "wood_panel", 2 ] ], [ [ "2x4", 6 ] ], [ [ "nails", 40, "LIST" ] ] ],
    "pre_note": "Must be supported on at least two sides.",
    "pre_special": "check_support",
    "post_terrain": "t_floor"
  },

This is what my construction of storage expansion 2 first section requires when everything apart from the floor has been replaced by "t_dirt": Chiseling 2, Digging 3, Hammering 2, Prying 3, Angle grinder, 540 planks or 72 logs, 1080 nails Time: 1 week and one day. This for 36 floor tiles, so 15 planks or 2 logs, 30 nails per tile, and 5+ hours per tile.

This leads me to believe there's something wrong with the construction sequence logic such that it's not selecting the construction recipe for the floor, but rather a longer sequence involving prying, chipping, and angle grinder. The tools match what's in the "wall_floor_glass_removal_standard" tool set, so it appears the logic selects the construction of something and then removal of it to end up with a floor. There are lots of "remove" constructions that result in "floor".

Someone with insight into the code determining the steps to construct a specified end result would need to look into this, as the logic obviously selects a longer and more complicated path than the direct construction of the end result (several steps is the logical case for some things, such as e.g. suitable empty ground->pit->half log wall->log wall).