CleverRaven/Cataclysm-DDA

Smashing railings on firetower causes floors to be built above

Open

#64.991 geöffnet am 11. Apr. 2023

Auf GitHub ansehen
 (9 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (3.991 Forks)batch import
(S2 - Confirmed)Help WantedMap / Mapgen[JSON]

Repository-Metriken

Stars
 (9.264 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 5h) (292 gemergte PRs in 30 T)

Beschreibung

Describe the bug

Railings on fire towers do not have a roof above them. When the railing on the fire lookout tower is destroyed, it is replaced with a floor tile that adds a roof. When the terrain is loaded for the first time after smashing the railing, a floor is created one z level up.

Attach save file

N/A

Steps to reproduce

  1. Find fire lookout tower
  2. Go to the top room, smash railings
  3. Observe railings converted to floor on the current z-level (as expected)
  4. Go up one Z level, observe thin air above smashed railings (as expected)
  5. Save and load game
  6. Observe floors appearing above the smashed railings

Expected behavior

Floors don't magically appear when I break railings

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19044.2728 (21H2)
  • Game Version: e084982 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [ Dark Days Ahead [dda], Bionic Professions [package_bionic_professions], No Fungal Growth [no_fungal_growth] ]

Additional context

I suspect this is because the fill_ter for that level of the firetower is t_floor instead of t_floor_noroof. So when the terrain gets smashed it is replaced with this. Or maybe railings are hardcoded to be replaced with t_floor when smashed? Interestingly the change is not apparent on the next z-level up until a save-load cycle occurs, but if you try to e.g. place a solar panel on the new floor it won't generate power.

While it would solve this issue, IDK if changing the fill_ter to t_floor_noroof would be ideal, since there is other furniture in the tower that should be roofed over. Ideally there would be some way to specify a 'terrain beneath' for each thing - maybe there is already but I haven't seen any way to do that in the docs. I'm going to keep an eye out for other buildings that have roofed-over furniture but open-air railings and see if they have any tricks that can be used to fix this.

Contributor Guide