From f86f59f17765e779a90a1de02e612e408adba1e0 Mon Sep 17 00:00:00 2001
From: Contrabang <91113370+Contrabang@users.noreply.github.com>
Date: Sat, 17 Sep 2022 01:15:21 -0400
Subject: [PATCH] Revert "Changes SR to not be an instant and unavoidable
revival. (#18910)" (#19089)
This reverts commit 37a3902a835d9b9eec7e51c59dff4f882739efa9.
---
.../reagents/chemistry/reagents/medicine.dm | 70 +++++++------------
1 file changed, 26 insertions(+), 44 deletions(-)
diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm
index 6bb02d249ae..b997d573fb9 100644
--- a/code/modules/reagents/chemistry/reagents/medicine.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine.dm
@@ -740,7 +740,6 @@
taste_description = "life"
harmless = FALSE
var/revive_type = SENTIENCE_ORGANIC //So you can't revive boss monsters or robots with it
- var/revive_time = 5 SECONDS // How long it takes for the revive to apply, about the same as a defib
/datum/reagent/medicine/strange_reagent/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
@@ -768,55 +767,38 @@
if(M.getBruteLoss() + M.getFireLoss() + M.getCloneLoss() >= 150)
M.delayed_gib()
return
-
- var/mob/dead/observer/ghost = M.get_ghost(TRUE)
- if(ghost && !ghost.can_reenter_corpse || M.suiciding || HAS_TRAIT(M, TRAIT_HUSK) || HAS_TRAIT(M, TRAIT_BADDNA))
+ if(!M.ghost_can_reenter())
M.visible_message("[M] twitches slightly, but is otherwise unresponsive!")
- M.do_jitter_animation(50)
return
- M.visible_message("[M] shakes violently!")
- if(ghost && ghost.can_reenter_corpse && ghost.client)
- to_chat(ghost, "Your body is being revived with Strange Reagent. Return to your body if you want to be revived!")
- window_flash(ghost.client)
- SEND_SOUND(ghost, sound('sound/effects/genetics.ogg'))
+ if(!M.suiciding && !HAS_TRAIT(M, TRAIT_HUSK) && !HAS_TRAIT(M, TRAIT_BADDNA))
+ var/time_dead = world.time - M.timeofdeath
+ M.visible_message("[M] seems to rise from the dead!")
+ M.adjustCloneLoss(50)
+ M.setOxyLoss(0)
+ M.adjustBruteLoss(rand(0, 15))
+ M.adjustToxLoss(rand(0, 15))
+ M.adjustFireLoss(rand(0, 15))
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ H.decaylevel = 0
+ var/necrosis_prob = 40 * min((20 MINUTES), max((time_dead - (1 MINUTES)), 0)) / ((20 MINUTES) - (1 MINUTES))
+ for(var/obj/item/organ/O in (H.bodyparts | H.internal_organs))
+ // Per non-vital body part:
+ // 0% chance of necrosis within 1 minute of death
+ // 40% chance of necrosis after 20 minutes of death
+ if(!O.vital && prob(necrosis_prob))
+ // side effects may include: Organ failure
+ O.necrotize(FALSE)
+ if(O.status & ORGAN_DEAD)
+ O.germ_level = INFECTION_LEVEL_THREE
+ H.update_body()
- M.do_jitter_animation(200)
- addtimer(CALLBACK(src, /datum/reagent/medicine/strange_reagent/.proc/revivify, M), revive_time)
+ M.grab_ghost()
+ M.update_revive()
+ add_attack_logs(M, M, "Revived with strange reagent") //Yes, the logs say you revived yourself.
..()
-/datum/reagent/medicine/strange_reagent/proc/revivify(mob/living/M)
- var/mob/dead/observer/ghost = M.get_ghost(TRUE) // update to check if they still have a ghost
- if(ghost) // if the observer is still outside their body
- M.visible_message("[M] stops shaking and falls limp.")
- return
-
- var/time_dead = world.time - M.timeofdeath
- M.adjustCloneLoss(50)
- M.setOxyLoss(0)
- M.adjustBruteLoss(rand(0, 15))
- M.adjustToxLoss(rand(0, 15))
- M.adjustFireLoss(rand(0, 15))
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- H.decaylevel = 0
- var/necrosis_prob = 40 * min((20 MINUTES), max((time_dead - (1 MINUTES)), 0)) / ((20 MINUTES) - (1 MINUTES))
- for(var/obj/item/organ/O in (H.bodyparts | H.internal_organs))
- // Per non-vital body part:
- // 0% chance of necrosis within 1 minute of death
- // 40% chance of necrosis after 20 minutes of death
- if(!O.vital && prob(necrosis_prob))
- // side effects may include: Organ failure
- O.necrotize(FALSE)
- if(O.status & ORGAN_DEAD)
- O.germ_level = INFECTION_LEVEL_THREE
- H.update_body()
-
- M.grab_ghost()
- M.update_revive()
- M.visible_message("[M] seems to rise from the dead!", "You rise from the dead!")
- add_attack_logs(M, M, "Revived with strange reagent") //Yes, the logs say you revived yourself.
-
/datum/reagent/medicine/mannitol
name = "Mannitol"
id = "mannitol"