Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(port): make shock absorbers actually absorb shock damage #4321

Merged
merged 1 commit into from
Mar 9, 2024

Conversation

LordZanos
Copy link
Contributor

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

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.
@github-actions github-actions bot added src changes related to source code. JSON related to game datas in JSON format. labels Mar 9, 2024
@LordZanos LordZanos changed the title vehicles: make shock absorbers actually absorb shock damage feat(port): make shock absorbers actually absorb shock damage Mar 9, 2024
@LordZanos LordZanos changed the title feat(port): make shock absorbers actually absorb shock damage fix(port): make shock absorbers actually absorb shock damage Mar 9, 2024
@scarf005 scarf005 requested a review from chaosvolt March 9, 2024 22:35
@scarf005 scarf005 merged commit a0a694d into cataclysmbnteam:main Mar 9, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JSON related to game datas in JSON format. src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants