Fixes defibbed corpse not getting blind overlay despite being in crit.

Brain mobs that are beaten to death can still be inserted inside a brainless human corpse but defibbing the corpse cannot work (the brain is too damaged). On the other hand cloning that corpse will still work.
Deffibing a brainless corpse no longer gives "further attempts may be successful".
Fixes brain mob's container var not being nullified on Destroy().
This commit is contained in:
phil235
2016-02-12 21:47:22 +01:00
parent 7416962f2a
commit 74e8bbf029
9 changed files with 27 additions and 17 deletions
+1 -1
View File
@@ -187,7 +187,7 @@
user << "<span class='warning'>The mmi indicates that their mind is currently inactive; it might change!</span>"
return
if(BM.stat == DEAD || BM.health <= config.health_threshold_dead)
if(BM.stat == DEAD || (M.brain && M.brain.damaged_brain))
user << "<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>"
return
+5 -2
View File
@@ -488,9 +488,12 @@
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return. Further attempts futile.</span>"
else if(total_burn >= 180 || total_brute >= 180)
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Severe tissue damage makes recovery of patient impossible via defibrillator. Further attempts futile.</span>"
else if(H.get_ghost() || !H.getorgan(/obj/item/organ/internal/brain))
else if(H.get_ghost())
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - No activity in patient's brain. Further attempts may be successful.</span>"
else
var/obj/item/organ/internal/brain/BR = H.getorgan(/obj/item/organ/internal/brain)
if(!BR || BR.damaged_brain)
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain is missing or damaged beyond point of no return. Further attempts futile.</span>"
if(failed)
user.visible_message(failed)