[MIRROR] Cuts the number of apply_damage
copypaste procs from 3(.5) to 1, fixing a few bugs along the way
#323
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.
Mirrored on Skyrat: Skyrat-SS13/Skyrat-tg#24619
Original PR: tgstation/tgstation#79207
About The Pull Request
apply_damage
is now uniform, handled, in a single place. At the living level.brute_mod
despite what documentation claims.check_species_weakness
proc on species.Why It's Good For The Game
The copy+paste of this proc made it awful, awful to maintain or add features to. And also made it very bug prone.
This just takes a step forward in making sustaining damage a lot more consistent, not only across all mobs, but across all methods of... taking damage. Unarmed attacks, hulk, item attacks, etc.
Changelog
🆑 Melbert
fix: People held at gunpoint can now flinch when being hit.
fix: Regenerating mobs no longer stop regenerating no matter hit with what.
fix: Pressure damage is now properly modified by a mob's brute damage modifier.
fix: Fixes some occasions which some effects (glass jaw, explodable worn items) won't respond to hits.
refactor: Refactored core code related to mobs sustaining damage.
/:cl: