Added roof bashing to 'indoors' terrain #72946
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
None
Purpose of change
Partial address of #72765, i.e. support bashing of roofs resulting in somewhat reasonable roofless terrain as a result.
Describe the solution
Adding ter_set_bashed_from_above entries to all roofed terrain in terrain-floors-indoors.json as well as adding a few roofless terrains to terrain-floors-outdoors for usage.
Adjusted a couple of ter_set values to be more consistent as a bycatch (t_dirt is better represented by t_null for instance, as that should resolve into something that's reasonable for the location).
Describe alternatives you've considered
Testing
Copied the modified JSON files elsewhere.
Switched to master (and hacked in the missed include that's PR:ed) and compiled.
Copied the saved JSON filed back (into "master").
Saved a save where a companion is clearing a hole while the PC is standing in the basement below.
Debug changed the terrain beneath the future hole to a terrain changed by this PR.
Waited until clearing was done.
Debug checked that the terrain below changed as expected (has to use debug as the terrain looks the same visually with the roof less version.
Killed and loaded the save.
Repeated the above for each changed terrain. For carpets only one color carpet was tested for each floor material as copy-from should ensure other colors behave the same.
Testing uncovered a few cases where terrain didn't specify roofs, as well as cases where the roof less terrain was misspelled (not exactly helped by the inconsistent nomenclature).
Additional context
As mentioned, the implementation is an attempt at a best fit between existing roofed and unroofed terrain, with the introduction of new terrain in only a bare minimum of cases. Reviewers might want new roof less terrain for additional questionable matches.
Note that this PR is not contain everything that ought to be updated, only a single file. There's more that needs doing. However, it might be that further efforts may require the addition of new entries to terrain-floors-outdoors which will cause the incompetent conflict detection to consider it a "conflict" to add entries directly after the entries added here, so the next step should not be performed after this PR is merged (assuming it's approved).
Apart from the errors detected during testing, there are several suspect terrain definitions in the indoors file that don't have roofs. There's a whole suite of colored ones, for instance. Those were not touched by this PR, both because they're slightly out of scope, but mostly because I don't know if they should have roofs.