Refactors reagent shock reduction (#28385)

* makes reagent shock reduction only apply to mobs that can process them

* Update code/modules/mob/living/carbon/human/human_life.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: chuga-git <98280110+chuga-git@users.noreply.github.com>

---------

Signed-off-by: chuga-git <98280110+chuga-git@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
chuga-git
2025-03-02 17:39:25 -06:00
committed by GitHub
parent ebf7fdbfd2
commit 6605985ef8
5 changed files with 90 additions and 80 deletions
+4 -2
View File
@@ -70,8 +70,10 @@
reagent = new reagent_prototype.type()
reagent.holder = target.reagents
reagent.on_new()
if(ishuman(target) && target.reagents.can_metabolize(target, reagent))
reagent.on_mob_add(target)
if(ishuman(target))
var/mob/living/carbon/human/human = target
if(human.can_metabolize(reagent))
reagent.on_mob_add(human)
target.reagents.reagent_list += reagent
reagent.volume = new_volume