mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Cuts the number of apply_damage copypaste procs from 3(.5) to 1, fixing a few bugs along the way (#79207)
## About The Pull Request - `apply_damage` is now uniform, handled, in a single place. At the living level. - Fixes people being held at gunpoint from being unable to flinch from taking damage. - Fixes a few signals (explodable, glass jaw) of apply damage maybe potentially not having effects if the passed hit zone was a bodypart and not a def zone. - Fixes regenerator component always halting regeneration no matter what damage taken. - Fixes pressure damage being unaffected by `brute_mod` despite what documentation claims. - Signalizes the `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. /🆑
This commit is contained in:
@@ -58,10 +58,10 @@
|
||||
"health" = creature.health,
|
||||
"name" = creature.name,
|
||||
"pilot" = pilot,
|
||||
"brute" = creature.get_current_damage_of_type(BRUTE),
|
||||
"burn" = creature.get_current_damage_of_type(BURN),
|
||||
"tox" = creature.get_current_damage_of_type(TOX),
|
||||
"oxy" = creature.get_current_damage_of_type(OXY),
|
||||
"brute" = creature.getBruteLoss(),
|
||||
"burn" = creature.getFireLoss(),
|
||||
"tox" = creature.getToxLoss(),
|
||||
"oxy" = creature.getOxyLoss(),
|
||||
))
|
||||
|
||||
return hosted_avatars
|
||||
|
||||
Reference in New Issue
Block a user