fix(port): make shock absorbers actually absorb shock damage #4321
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.
Add the SHOCK_ABSORBER flag to shock absorbers, and change vehicle::damage_all() so that parts on the same tile as a shock absorber take substantially less damage from transmitted shock damage in collisions.
Purpose of change
Ports CleverRaven/Cataclysm-DDA#43013
Vehicles generally take a lot of damage internally from collisions, this modifies the shock absorber part to provide a buffer on individual tiles.
Describe the solution
Port change.
Describe alternatives you've considered
Reducing collision damage across the board?
Testing
Spawned a solar car, welded a shock absorber onto one of the solar panel tiles, smashed the car into a radio tower repeatedly. Most of the panel in the back of the car were badly damaged or destroyed, the tile with the shock absorber was fine.
Additional context
This implementation is somewhat limited, only a tile with a shock absorber installed receives any protection.
It would probably also make sense to add shock absorbers to the default configurations of heavier vehicles in the game.
Checklist