mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] Organ removal ends metabolizing reagents in the organ (#768)
* Organ removal ends metabolizing reagents in the organ (#53619) If an organ contains reagents it will end metabolizing them on removal. * Organ removal ends metabolizing reagents in the organ Co-authored-by: NightRed <nightred@gmail.com>
This commit is contained in:
@@ -60,6 +60,16 @@
|
||||
|
||||
//Special is for instant replacement like autosurgeons
|
||||
/obj/item/organ/proc/Remove(mob/living/carbon/M, special = FALSE)
|
||||
//Stop any reagent metabolizing on organ destruction
|
||||
if(reagents && iscarbon(owner))
|
||||
var/mob/living/carbon/body = owner
|
||||
for(var/chem in reagents.reagent_list)
|
||||
var/datum/reagent/reagent = chem
|
||||
if(reagent.metabolizing)
|
||||
reagent.metabolizing = FALSE
|
||||
reagent.on_mob_end_metabolize(body)
|
||||
reagent.on_mob_delete(body) //It was removed from the body
|
||||
|
||||
owner = null
|
||||
if(M)
|
||||
M.internal_organs -= src
|
||||
|
||||
Reference in New Issue
Block a user