Ghommie's requiem

This commit is contained in:
Thalpy
2019-11-21 19:39:55 +00:00
parent bd07ff4bf7
commit 0cce3a01f4
5 changed files with 52 additions and 46 deletions
@@ -941,18 +941,18 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
color = "#EEFF8F"
/datum/reagent/neurine/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
var/obj/item/organ/brain/B = M.getorganslot(ORGAN_SLOT_BRAIN)
if(!B)
if(method != INJECT)
return
if(method == INJECT)
if(B.organ_flags & ORGAN_FAILING)
B.applyOrganDamage(-20)
if(prob(80))
B.gain_trauma_type(BRAIN_TRAUMA_MILD)
else if(prob(50))
B.gain_trauma_type(BRAIN_TRAUMA_SEVERE)
else
B.gain_trauma_type(BRAIN_TRAUMA_SPECIAL)
var/obj/item/organ/brain/B = M.getorganslot(ORGAN_SLOT_BRAIN)
if(!B || !(B.organ_flags & ORGAN_FAILING))
return
B.applyOrganDamage(-20)
if(prob(80))
B.gain_trauma_type(BRAIN_TRAUMA_MILD)
else if(prob(50))
B.gain_trauma_type(BRAIN_TRAUMA_SEVERE)
else
B.gain_trauma_type(BRAIN_TRAUMA_SPECIAL)
/datum/reagent/medicine/neurine/on_mob_life(mob/living/carbon/C)
if(holder.has_reagent("neurotoxin"))
@@ -16,17 +16,13 @@
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 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]. ")
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.")
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)
@@ -35,12 +31,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, (tool), 1, FALSE, FALSE, FALSE, TRUE)
H.electrocute_act(25, (get_turf(H)), 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 prepare to pulse.</span>",
display_results(user, target, "<span class='notice'>You attach the [tool] to [target]'s heart and prepares to pulse.</span>",
"[user] attaches the [tool] to [H]'s heart and prepares to pulse.",
"")
H.adjustBruteLoss(10)
@@ -50,10 +46,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, (tool), 1, FALSE, FALSE, FALSE, TRUE)
H.electrocute_act(0, (get_turf(H)), 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
return TRUE
//Otherwise, we're ad hocing it
if(!(do_after(user, 50, target = target)))
return FALSE
@@ -70,8 +66,8 @@
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, (tool), 1, FALSE, FALSE, FALSE, TRUE)
H.adjustFireLoss(5)
H.electrocute_act(25, (get_turf(H)), 1, FALSE, FALSE, FALSE, TRUE)
H.adjustFireLoss(10)
H.emote("flip")
H.adjustOrganLoss(ORGAN_SLOT_HEART, 10)
@@ -87,18 +83,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 become too decomposed.</span>"
failed = "<span class='warning'>The heart is zapped by the [tool], but nothing happens. It appears their body has beomce too decomposed.</span>"
else if(total_burn >= 180 || total_brute >= 180)
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>"
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>"
else if(H.get_ghost())
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>"
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>"
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, restarting the heart, but without a brain the contractions quickly die out.</span>"
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>"
if(failed)
@@ -116,7 +112,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, inducing 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, incuding 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()
@@ -98,16 +98,12 @@
//Checks to see if the organ is frozen from temperature
/obj/item/organ/proc/is_cold()
var/freezing_objects = list(/obj/structure/closet/crate/freezer, /obj/structure/closet/secure_closet/freezer, /obj/structure/bodycontainer, /obj/item/autosurgeon, /obj/machinery/smartfridge/organ)
if(istype(loc, /obj/))//Freezer of some kind, I hope.
if(is_type_in_list(loc, freezing_objects))
if(is_type_in_list(loc, GLOB.freezing_objects))
if(!(organ_flags & ORGAN_FROZEN))//Incase someone puts them in when cold, but they warm up inside of the thing. (i.e. they have the flag, the thing turns it off, this rights it.)
organ_flags |= ORGAN_FROZEN
return TRUE
var/external_check = FALSE
if(organ_flags & ORGAN_FROZEN)
external_check = TRUE
return external_check
return (organ_flags & ORGAN_FROZEN) //Incase something else toggles it
var/local_temp
if(istype(loc, /turf/))//Only concern is adding an organ to a freezer when the area around it is cold.
@@ -117,7 +113,7 @@
else if(istype(loc, /mob/) && !owner)
var/mob/M = loc
if(is_type_in_list(M.loc, freezing_objects))
if(is_type_in_list(M.loc, GLOB.freezing_objects))
if(!(organ_flags & ORGAN_FROZEN))
organ_flags |= ORGAN_FROZEN
return TRUE
@@ -127,7 +123,7 @@
if(owner)
//Don't interfere with bodies frozen by structures.
if(is_type_in_list(owner.loc, freezing_objects))
if(is_type_in_list(owner.loc, GLOB.freezing_objects))
if(!(organ_flags & ORGAN_FROZEN))
organ_flags |= ORGAN_FROZEN
return TRUE