-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
vehicles: make shock absorbers actually absorb shock damage #43013
Conversation
Wait, so shock absorbers act as shock isolation just for the location where they are installed? I see that the "info" field for the property is clear about it, might be a good idea to adjust the vehicle part to match. |
shock absorbers as bumpers has three problems:
I'll update the JSON_FLAGS.md, of course. |
What about crumple zones? Are shock absorber equal to crumple zones or are they something else? How I imagine crumple zone parts would work: Lets say that In other words if the front row of the car tiles has crumple zones built in front each such zone would contribute to protecting the second row of car tiles. This contribution can also be modeled - damage for the crumple zone tile could be actually increased as it is specifically designed for a destructive absorption of impact energy. Result: front of the car smashed to smithereens, but the passenger is intact. |
Crumple zones are way beyond the scope of this PR. |
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.
7afd47e
to
db5ad7f
Compare
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/collision-damage-through-the-roof-intended/25383/2 |
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: |
Summary
SUMMARY: Bugfixes "vehicles: make shock absorbers actually absorb shock damage"
Purpose of change
Shock absorbers are supposed to absorb transmitted shock damage from collision, but they're just low grade armor. Fix them so they aren't armor at all (though they take up the armor location) and absorb transmitted shock damage properly.
Describe the solution
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.
Testing
I spawned a solar car and welded a shock absorber to the (-4, 0) frame, then I saved the game. Running into a concrete barrier in reverse at -20 mph completely wrecked every upgraded solar panel in the rear of the car.
I added the patch and reloaded the game. This time, running into the concrete barrier in reverse at -20 mph completely wrecked every solar panel in the rear of the car except the one at (-4, 0), which was unscathed.
Repeating the test with a collision speed of -45 mph wrecked all the solar panels again.