mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
Refactors heart attacks, unbreaks incremental cloning
This commit is contained in:
@@ -330,8 +330,8 @@
|
||||
H.updatehealth() //forces health update before next life tick
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
H.emote("gasp")
|
||||
if(!H.heart_attack && (prob(10) || defib.combat)) // Your heart explodes.
|
||||
H.heart_attack = 1
|
||||
if(!H.undergoing_cardiac_arrest() && (prob(10) || defib.combat)) // Your heart explodes.
|
||||
H.set_heartattack(TRUE)
|
||||
add_logs(user, M, "stunned", object="defibrillator")
|
||||
defib.deductcharge(revivecost)
|
||||
cooldown = 1
|
||||
@@ -368,7 +368,7 @@
|
||||
busy = 0
|
||||
update_icon()
|
||||
return
|
||||
if(H.heart_attack)
|
||||
if(H.undergoing_cardiac_arrest())
|
||||
if(!H.get_int_organ(/obj/item/organ/internal/heart) && !H.get_int_organ(/obj/item/organ/internal/brain/slime)) //prevents defibing someone still alive suffering from a heart attack attack if they lack a heart
|
||||
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Failed to pick up any heart electrical activity.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
@@ -376,7 +376,7 @@
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
H.heart_attack = 0
|
||||
H.set_heartattack(FALSE)
|
||||
user.visible_message("<span class='boldnotice'>[defib] pings: Cardiac arrhythmia corrected.</span>")
|
||||
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
@@ -474,8 +474,8 @@
|
||||
H.adjustStaminaLoss(50)
|
||||
H.Weaken(5)
|
||||
H.updatehealth() //forces health update before next life tick
|
||||
if(!H.heart_attack && prob(10)) // Your heart explodes.
|
||||
H.heart_attack = 1
|
||||
if(!H.undergoing_cardiac_arrest() && prob(10)) // Your heart explodes.
|
||||
H.set_heartattack(TRUE)
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
H.emote("gasp")
|
||||
add_logs(user, M, "stunned", object="defibrillator")
|
||||
|
||||
Reference in New Issue
Block a user