[MIRROR] Reaction rates, pH, purity and more! Brings a heavily improved, less explosive and optimised fermichem to tg. (#3306)

* Reaction rates, pH, purity and more! Brings a heavily improved, less explosive and optimised fermichem to tg.

* a

Co-authored-by: Thalpy <33956696+Thalpy@users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
This commit is contained in:
SkyratBot
2021-02-12 00:04:39 +00:00
committed by GitHub
co-authored by Thalpy Gandalf2k15
parent bb6415fffb
commit 7da4aa9adf
77 changed files with 3915 additions and 552 deletions
+15
View File
@@ -105,6 +105,21 @@
if(damage > maxHealth)//cap liver damage
damage = maxHealth
/obj/item/organ/liver/on_death()
. = ..()
var/mob/living/carbon/carbon_owner = owner
if(!owner)//If we're outside of a mob
return
if(!iscarbon(carbon_owner))
CRASH("on_death() called for [src] ([type]) with invalid owner ([isnull(owner) ? "null" : owner.type])")
if(carbon_owner.stat != DEAD)
CRASH("on_death() called for [src] ([type]) with not-dead owner ([owner])")
if((organ_flags & ORGAN_FAILING) && HAS_TRAIT(carbon_owner, TRAIT_NOMETABOLISM))//can't process reagents with a failing liver
return
for(var/reagent in carbon_owner.reagents.reagent_list)
var/datum/reagent/R = reagent
R.on_mob_dead(carbon_owner)
#undef HAS_SILENT_TOXIN
#undef HAS_NO_TOXIN
#undef HAS_PAINFUL_TOXIN