From a2a503ffaeee5db75baf2a2ee2bfd776ca8d6305 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Thu, 5 Oct 2023 13:26:42 -0400 Subject: [PATCH] Defib property changes --- .../chemistry_properties/prop_positive.dm | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/code/modules/reagents/chemistry_properties/prop_positive.dm b/code/modules/reagents/chemistry_properties/prop_positive.dm index 7f476cecf2c5..10ccd454bd81 100644 --- a/code/modules/reagents/chemistry_properties/prop_positive.dm +++ b/code/modules/reagents/chemistry_properties/prop_positive.dm @@ -548,7 +548,6 @@ rarity = PROPERTY_RARE category = PROPERTY_TYPE_REACTANT value = 3 - max_level = 1 /datum/chem_property/positive/defibrillating/on_delete(mob/living/M) ..() @@ -574,19 +573,24 @@ /datum/chem_property/positive/defibrillating/process_dead(mob/living/M, potency = 1, delta_time) if(!ishuman(M)) return - var/mob/living/carbon/human/H = M - H.apply_damage(-H.getOxyLoss(), OXY) - if(H.check_tod() && H.is_revivable() && H.health > HEALTH_THRESHOLD_DEAD) - to_chat(H, SPAN_NOTICE("You feel your heart struggling as you suddenly feel a spark, making it desperately try to continue pumping.")) - playsound_client(H.client, 'sound/effects/Heart Beat Short.ogg', 35) - addtimer(CALLBACK(H, TYPE_PROC_REF(/mob/living/carbon/human, handle_revive)), 50, TIMER_UNIQUE) - else if (potency > POTENCY_MAX_TIER_1 && H.check_tod() && H.is_revivable() && H.health < HEALTH_THRESHOLD_DEAD) //Will heal if level is 7 or greater - to_chat(H, SPAN_NOTICE("You feel a faint spark in your chest.")) - H.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, BRUTE) - H.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, BURN) - H.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, TOX) - H.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, CLONE) - H.apply_damage(-H.getOxyLoss(), OXY) + var/mob/living/carbon/human/dead = M + dead.apply_damage(-dead.getOxyLoss(), OXY) + if(dead.check_tod() && dead.is_revivable() && dead.health > HEALTH_THRESHOLD_DEAD ) + addtimer(CALLBACK(dead, TYPE_PROC_REF(/mob/living/carbon/human, handle_revive)), 50, TIMER_UNIQUE) + to_chat(dead, SPAN_NOTICE("You feel your heart struggling as you suddenly feel a spark, making it desperately try to continue pumping.")) + playsound_client(dead.client, 'sound/effects/Heart Beat Short.ogg', 35) + else if (potency > 1 && dead.check_tod() && dead.is_revivable() && dead.health <= HEALTH_THRESHOLD_DEAD) //heals on all level above 1. This is however, minimal. + to_chat(dead, SPAN_NOTICE("You feel a faint spark in your chest.")) + dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, BRUTE) + dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, BURN) + dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, TOX) + dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, CLONE) + dead.apply_damage(-dead.getOxyLoss(), OXY) + if(dead.health > HEALTH_THRESHOLD_DEAD) + var/mob/dead/observer/ghost = dead.get_ghost() + if(ghost?.client) + playsound_client(ghost.client, 'sound/effects/adminhelp_new.ogg') + to_chat(ghost, SPAN_BOLDNOTICE("Your heart is struggling to pump! There is a chance you might get up!(Verbs -> Ghost -> Re-enter corpse, or click here!)")) return TRUE /datum/chem_property/positive/hyperdensificating