fixes defibs sometimes treating heart attacks instead of death (#25995)

This commit is contained in:
Luc
2024-06-22 22:52:18 +00:00
committed by GitHub
parent a960b7de6d
commit 32d4a2ecf4
+2 -1
View File
@@ -209,7 +209,7 @@
busy = FALSE
return
if(target.undergoing_cardiac_arrest()) // Can have a heart attack and heart is either missing, necrotic, or not beating
if(target.undergoing_cardiac_arrest() && target.stat != DEAD) // Can have a heart attack and heart is either missing, necrotic, or not beating
var/datum/organ/heart/heart = target.get_int_organ_datum(ORGAN_DATUM_HEART)
if(!heart)
user.visible_message("<span class='boldnotice'>[defib_ref] buzzes: Resuscitation failed - Failed to pick up any heart electrical activity.</span>")
@@ -291,6 +291,7 @@
if(time_dead > DEFIB_TIME_LOSS && defib_time_brain_damage > target.getBrainLoss())
target.setBrainLoss(defib_time_brain_damage)
target.set_heartattack(FALSE)
target.update_revive()
target.KnockOut()
target.Paralyse(10 SECONDS)