Strange revert
This commit is contained in:
@@ -16,13 +16,17 @@
|
||||
if(!pads.wielded)
|
||||
to_chat(user, "<span class='warning'>You need to wield the paddles in both hands before you can use them!</span>")
|
||||
return FALSE
|
||||
display_results(user, target, "<span class='notice'>You begin to apply an electrical charge directly to the heart body...</span>",
|
||||
"[user] begins to make an incision in [target]'s heart.",
|
||||
"[user] begins to make an incision in [target]'s heart.")
|
||||
display_results(user, target, "<span class='notice'>You begin to apply the [tool] onto the heart directly...</span>",
|
||||
"[user] begin to prepare the heart for contact with the [tool].",
|
||||
"[user] begin to prepare the heart for contact with the [tool]. ")
|
||||
target.notify_ghost_cloning("Your heart is undergoing Emergency Cardioversion Induction Surgery!")
|
||||
playsound(src, 'sound/machines/defib_charge.ogg', 75, 0)
|
||||
|
||||
/datum/surgery_step/ventricular_electrotherapy/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(istype(tool, /obj/item/twohanded/shockpaddles))
|
||||
var/obj/item/twohanded/shockpaddles/pads = tool
|
||||
if(!pads.wielded)
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = target
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', 75, 1, -1)
|
||||
playsound(src, "bodyfall", 50, 1)
|
||||
@@ -31,12 +35,12 @@
|
||||
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>",
|
||||
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>")
|
||||
H.emote("scream")
|
||||
H.electrocute_act(25, (get_turf(H)), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
H.electrocute_act(25, (tool), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
H.adjustFireLoss(10)
|
||||
H.emote("flip")
|
||||
H.Jitter(100)
|
||||
return FALSE
|
||||
display_results(user, target, "<span class='notice'>You attach the [tool] to [target]'s heart and prepares to pulse.</span>",
|
||||
display_results(user, target, "<span class='notice'>You attach the [tool] to [target]'s heart and prepare to pulse.</span>",
|
||||
"[user] attaches the [tool] to [H]'s heart and prepares to pulse.",
|
||||
"")
|
||||
H.adjustBruteLoss(10)
|
||||
@@ -46,10 +50,10 @@
|
||||
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
|
||||
if(BR.organ_flags & ORGAN_FAILING)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_BRAIN, -5)
|
||||
H.electrocute_act(0, (get_turf(H)), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
H.electrocute_act(0, (tool), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
//If we're using a defib, let the defib handle the revive.
|
||||
if(istype(tool, /obj/item/twohanded/shockpaddles))
|
||||
return TRUE
|
||||
return
|
||||
//Otherwise, we're ad hocing it
|
||||
if(!(do_after(user, 50, target = target)))
|
||||
return FALSE
|
||||
@@ -66,7 +70,7 @@
|
||||
display_results(user, target, "<span class='warning'>You screw up, sending a current through their body!</span>",
|
||||
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>",
|
||||
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>")
|
||||
H.electrocute_act(25, (get_turf(H)), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
H.electrocute_act(25, (tool), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
H.adjustFireLoss(10)
|
||||
H.emote("flip")
|
||||
H.adjustOrganLoss(ORGAN_SLOT_HEART, 10)
|
||||
@@ -83,18 +87,18 @@
|
||||
else if (H.hellbound)
|
||||
failed = "<span class='warning'>The heart is zapped by the [tool], but nothing happens. You notice a small tatoo with the words \"Property of Satan\" branded just above the right ventricle.</span>"
|
||||
else if(tdelta > (DEFIB_TIME_LIMIT * 10))
|
||||
failed = "<span class='warning'>The heart is zapped by the [tool], but nothing happens. It appears their body has beomce too decomposed.</span>"
|
||||
failed = "<span class='warning'>The heart is zapped by the [tool], but nothing happens. It appears their body decomposed beyond repair.</span>"
|
||||
else if(total_burn >= 180 || total_brute >= 180)
|
||||
failed = "<span class='warning'>The [tool] zaps the heart, incuding a sudden contraction, but it appears [H]'s body is too damaged to revive presently.</span>"
|
||||
failed = "<span class='warning'>The [tool] zaps the heart, inducing a sudden contraction, but it appears [H]'s body is too damaged to revive presently.</span>"
|
||||
else if(H.get_ghost())
|
||||
failed = "<span class='warning'>The [tool] zaps the heart, incuding several contractions before dying down, but there's no spark of life in [H]'s eyes. It may be worth it to try again, however.</span>"
|
||||
failed = "<span class='warning'>The [tool] zaps the heart, inducing several contractions before dying down, but there's no spark of life in [H]'s eyes. It may be worth it to try again, however.</span>"
|
||||
else
|
||||
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
|
||||
if(BR)
|
||||
if(H.suiciding || BR.brainmob?.suiciding)
|
||||
failed = "<span class='warning'>The heart is zapped by the [tool], but nothing happens. You feel like the spark of life has fully left [H].</span>"
|
||||
else
|
||||
failed = "<span class='warning'>The [tool] zaps the heart, incuding several contractions before dying down, but without a brain the contractions quickly die out.</span>"
|
||||
failed = "<span class='warning'>The [tool] zaps the heart, restarting the heart, but without a brain the contractions quickly die out.</span>"
|
||||
|
||||
|
||||
if(failed)
|
||||
@@ -112,7 +116,7 @@
|
||||
H.adjustFireLoss((mobhealth - HALFWAYCRITDEATH) * (total_burn / overall_damage), 0)
|
||||
H.adjustBruteLoss((mobhealth - HALFWAYCRITDEATH) * (total_brute / overall_damage), 0)
|
||||
H.updatehealth() // Previous "adjust" procs don't update health, so we do it manually.
|
||||
H.visible_message("<span class='notice'>The [tool] zaps the heart, incuding several contractions before speeding up into a regular rhythm, [H]'s eyes snapping open with a loud gasp!</span>")
|
||||
H.visible_message("<span class='notice'>The [tool] zaps the heart, inducing several contractions before speeding up into a regular rhythm, [H]'s eyes snapping open with a loud gasp!</span>")
|
||||
playsound(src, 'sound/machines/defib_success.ogg', 50, 0)
|
||||
H.set_heartattack(FALSE)
|
||||
H.revive()
|
||||
|
||||
Reference in New Issue
Block a user