diff --git a/code/modules/reagents/chemistry_properties/prop_positive.dm b/code/modules/reagents/chemistry_properties/prop_positive.dm index 7f476cecf2c5..971051e9bf88 100644 --- a/code/modules/reagents/chemistry_properties/prop_positive.dm +++ b/code/modules/reagents/chemistry_properties/prop_positive.dm @@ -548,7 +548,7 @@ rarity = PROPERTY_RARE category = PROPERTY_TYPE_REACTANT value = 3 - max_level = 1 + COOLDOWN_DECLARE(ghost_notif) /datum/chem_property/positive/defibrillating/on_delete(mob/living/M) ..() @@ -574,19 +574,33 @@ /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 + var/revivable = dead.check_tod() && dead.is_revivable() + if(revivable && (dead.health > HEALTH_THRESHOLD_DEAD)) + addtimer(CALLBACK(dead, TYPE_PROC_REF(/mob/living/carbon/human, handle_revive)), 5 SECONDS) + 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) && 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(potency > CREATE_MAX_TIER_1) //heal more if higher levels + dead.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, BRUTE) + dead.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, BURN) + dead.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, TOX) + dead.apply_damage(-potency * POTENCY_MULTIPLIER_LOW, CLONE) + if(dead.health < HEALTH_THRESHOLD_DEAD) + return + if(!COOLDOWN_FINISHED(src, ghost_notif)) + return + var/mob/dead/observer/ghost = dead.get_ghost() + if(ghost?.client) + COOLDOWN_START(src, ghost_notif, 30 SECONDS) + 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 diff --git a/sound/effects/Heart Beat Short.ogg b/sound/effects/heart_beat_short.ogg similarity index 100% rename from sound/effects/Heart Beat Short.ogg rename to sound/effects/heart_beat_short.ogg