Refactor riot damage + add 'pre-burnt' generator #80753
Merged
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
#79943
This PR breaks up the bashing, item moving, and fire-setting into separate standardized functions. It aims to eliminate 'magic numbers' and prepare the code to be loaded from JSON definitions.
Additionally, another generator is added along the same principles. 'Pre-brunt'. This is used to simulate fires having already happened before the player visited, and is intended to largely be a 1:1 replacement for fires for later arrivals.
Describe the solution
#79943
For pre-burnt structures we designate a square, or a circle, or some area, and we say "That had a fire". We replace anything with the
WALL
flag with a hardcoded terrain,burnt wall
or whatever. We replace floors with a similar one. Outside areas get torched into dirt. Delete all furniture and items in the affected area, litter some ash piles.The current implementation simply burns the entire OMT, without trying to make any fun shapes.
Describe alternatives you've considered
Testing
(Taken during development, floors were not properly burned. They are burned now, and look like

t_dirtfloor
)Additional context
Ugh git makes a really awful looking diff for this.